This is a migrated thread and some comments may be shown as answers.

Update TextBox in RadGrid

1 Answer 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mazdak
Top achievements
Rank 1
Mazdak asked on 11 Jan 2012, 09:26 PM
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?

Regards
Mazdak

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Jan 2012, 05:12 AM
Hello Mazdak,

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

-Shinu.
Tags
Grid
Asked by
Mazdak
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or