>I have an ASP.net page on a C# project.
>
>There is a datagrid on a page with edit,update,cancel set for column 0. I can place the grid into edit mode without any problems but when I read the values on the UpdateCommand, the edit values are missing.
>
>e.Item.Cells[2].Text is blank
>
>and
>
>TextBox ctext = (TextBox)e.Item.Cells[2].Controls[0];
>oBizObj.scAddress_Type = ctext.Text.ToString() ;
>
>gives the original value of the textbox.
>
>What am I forgetting???
The DataGridEventArgs parameter "e" is a basically a reference to the HTML table that the DataGrid renders and the browser displays. e.Item.Cells[2] is a reference to the HTML table's cell, not the controls that it contains. To get to the control, use the FindControl method of e.Item.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement