error - string methods do not exist

Machaira

Junior Contributor
Joined
Aug 19, 2002
Messages
325
Location
Abingdon, MD
OK, I'm stumped. I'm trying to take the substring of a string:

row.ItemArray[8]=grdInfo.Rows[1].Cells[2].Text.Substring(4);

The cell has data in it - "Ion 81", so there should be no problem with getting the number part of the string out of it. However, I get the error: "grdInfo.Rows[1].Cells[2].Text.Substring does not exist". This error is returned for all the methods of the Text object, but I can access the Length property. What the...?!? The error is returned even if I assign the Text property to another string:

string temp = grdInfo.Rows[1].Cells[2].Text;
row.ItemArray[8]=temp.Substring(4);

Any ideas?

Thanks!
 
Back
Top