Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UpdateCommand for Datagrid
Message
De
07/09/2004 00:22:51
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
30/08/2004 11:34:49
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00937646
Message ID:
00939847
Vues:
18
>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
Fil
Voir

Click here to load this message in the networking platform