Please help me with this RowUpdating function.
I copied it from the internet and modified the part that I could understand. and not surprisingly, it's not working.
When I tried to update a row, there's not error message, it's just not updating anything.
I copied it from the internet and modified the part that I could understand. and not surprisingly, it's not working.
When I tried to update a row, there's not error message, it's just not updating anything.
Code:
protected void gvStudentsAndProjects_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridView gv = (GridView)sender;
for (int i = 0; i < gv.Columns.Count; i++)
{
DataControlFieldCell cell = gv.Rows[e.RowIndex].Cells[i] as DataControlFieldCell;
gv.Columns[i].ExtractValuesFromCell(e.NewValues, cell, DataControlRowState.Edit, true);
}
//e.Cancel = true;
databind();
}