(TextBox) (e.Item.Cells[2].Controls[0]) - Cast Invalid - Cannot update.

Discussion in 'ASP .Net Datagrid Control' started by Ravichandran Mahalingam, Jan 12, 2004.

  1. Dear Readers,

    Based on the information downloaded from the internet and the msdn
    help shown below,
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatagridclassupdatecommandtopic.asp>

    wanted to get the information from the grid after the user has edited
    to the textbox variable as shown below:

    TextBox myCurrentTextBox ;

    myCurrentTextBox = (TextBox) (e.Item.Cells[2].Controls[0]);
    strNewSeqNum = myCurrentTextBox.Text;

    fails while setting the myCurrentTextBox;

    I am trying to edit the contents of the grid and all these are a part
    of the Grid_Update(,) function.

    any help in this regard will be appreciated.

    thanks and regards
    Ravi.
     
    Ravichandran Mahalingam, Jan 12, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    538
  2. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    319
    Joel Finkel
    Sep 1, 2003
  3. SoftLion
    Replies:
    2
    Views:
    135
    George
    May 6, 2004
  4. Keith-Earl
    Replies:
    5
    Views:
    198
  5. Simple question: e.Item.Cells(0).Controls­(0)

    , Aug 2, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    186
    Sachin Saki
    Aug 12, 2005
Loading...

Share This Page