DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Insert,delete,edit,update in DataGrid? (http://www.daniweb.com/forums/thread162556.html)

preethi_ga Dec 16th, 2008 9:28 am
Insert,delete,edit,update in DataGrid?
 
Can anyone tell me how to Insert,Delete,edit,update records in a DataGrid in ASP.NET? if u give the coding in VB , i can understand properly.

binoj_daniel Dec 16th, 2008 4:12 pm
Re: Insert,delete,edit,update in DataGrid?
 
You can use the GridView which is the most recent version of the DataGrid control in ASP.NET.

You can make use of the GridView events RowCommand, RowDataBound, RowDeleting, RowEditing, RowUpdating which you can set in the GridView markup. See the below code markup.

             <asp:GridView ID="gv_Lookup" runat="server" DataKeyNames="LookupCD"  
                AutoGenerateColumns="True"                OnRowDataBound="gv_Lookup_RowDataBound" OnRowEditing="gv_Lookup_RowEditing" OnRowUpdating="gv_Lookup_RowUpdating"
OnRowCommand="gv_Lookup_RowCommand" OnRowDeleting="gv_Lookup_RowDeleting" ShowFooter="True"
>

For more detailed articles on ASP.NET and other technologies visit www.coderewind.com


All times are GMT -4. The time now is 5:34 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC