Datagrid edit - whare are the changed values?

G

Guest

I have a datagrid with 3 bound columns, two of them editable. The problem is
when in edit mode, I just can't access the values I typed into the 'new' text
boxes. Whatever I type in is not available to be used as update parameters
in my sql.

For instance, the three strings below (strUserName, strFullName, strPhone)
return the Values of the field BEFORE edit mode. I have no way to extract
the values I type during edit.
----------------------------------------------------------

protected void dGrid_Update(object sender, DataGridCommandEventArgs e)
{
string strUserName = e.Item.Cells[1].Text;
string strFullName = ((TextBox)e.Item.Cells[2].Controls[0]).Text;
string strPhone = ((TextBox)e.Item.Cells[3].Controls[0]).Text;

DoUserUpdate(strUserName, strFullName, strPhone); //call method to
update Oracle table
dGrid.EditItemIndex = -1;
BindGrid();
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,814
Latest member
SpicetreeDigital

Latest Threads

Top