Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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!

Here's what I'm up to.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...