Machaira
Junior Contributor
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!
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!