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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.