Update TextBox in RadGrid

2 posts, 0 answers
  1. Mazdak
    Mazdak avatar
    30 posts
    Member since:
    Nov 2010

    Posted 11 Jan 2012 Link to this post

    I want to have a textbox in my Grid ( not in Edit mode ) and it has integer values from my datasource, Is that possible that when user edit the value and go to another textbox, my datasource updated from code-behind?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Jan 2012 Link to this post

    Hello Mazdak,

    Try the following code.
    protected void grid_UpdateCommand(object sender, GridCommandEventArgs e)
     GridEditableItem editItem = (GridEditableItem)e.Item;
     TextBox txt = (TextBox)editItem.FindControl("TextBox1");
     string val = txt.Text;

Back to Top