(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. Advertisements

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. Hajime Kusakabe
    Replies:
    1
    Views:
    709
    Mike Moore [MSFT]
    Oct 23, 2003
  2. Replies:
    0
    Views:
    734
  3. narke
    Replies:
    1
    Views:
    846
  4. Joel Finkel

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

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

    , Aug 2, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    241
    Sachin Saki
    Aug 12, 2005
  8. bteclt

    ASP Server Controls Specified Cast is Invalid

    bteclt, May 11, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    185
    bteclt
    May 11, 2005
Loading...