469,622 Members | 1,445 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,622 developers. It's quick & easy.

What's wrong with my RowUpdating function?

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.


Expand|Select|Wrap|Line Numbers
  1. protected void gvStudentsAndProjects_RowUpdating(object sender, GridViewUpdateEventArgs e)
  2.     {
  3.         GridView gv = (GridView)sender;
  4.         for (int i = 0; i < gv.Columns.Count; i++)
  5.         {
  6.             DataControlFieldCell cell = gv.Rows[e.RowIndex].Cells[i] as DataControlFieldCell;
  7.             gv.Columns[i].ExtractValuesFromCell(e.NewValues, cell, DataControlRowState.Edit, true);
  8.         }
  9.         //e.Cancel = true;
  10.         databind();
  11.     }
  12.  
Oct 31 '07 #1
0 691

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Maurizio | last post: by
reply views Thread by merco | last post: by
3 posts views Thread by slemen | last post: by
3 posts views Thread by nick chan | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.