Skip to content
Loading
  • Vinay Singh
    0
    Hi
    Try the below links
    http://www.dotnetlearners.com/blogs/view/20/aspnet-gridview-basic-example-for-insert-update-and-delete-the-records.aspx
    http://www.aspsnippets.com/Articles/Simple-Insert-Select-Edit-Update-and-Delete-in-ASPNet-GridView-control.aspx
    http://www.c-sharpcorner.com/UploadFile/0c1bb2/insert-update-delete-in-gridview-using-single-stored-proce/
    0
  • 0
    Hi kamala veni
    Are you sure, Are you get the RowIndex value..? if u get the row value or Null..?
    0
  • 0
    Index was out of range. Must be non-negative and less than the size of the collection.
    am getting dis error
    0
  • Vinay Singh
    0
    Try the code as given
    check link
    https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowupdating(v=vs.110).aspx 
    1. DataTable dt = (DataTable)Session["TaskTable"];

    2. GridViewRow row=TaskGridView.Rows[e.RowIndex];
    3. dt.Rows[row.DataItemIndex]["Id"]=((TextBox)(row.Cells[1].Controls[0])).Text;
    0