472,328 Members | 1,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

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 737

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

Similar topics

7
by: Programatix | last post by:
Hi, I'm working on a WebService project. I'm trying to validate data before they are updated to the database by handling the RowUpdating event...
4
by: Maurizio | last post by:
Ciao a tutti, sto cercando di realizzare una classe (ProviderFactory) che mi consenta di scrivere del codice a prescindere dal provider utilizzato...
0
by: fatmosh | last post by:
I have a GridView that is pulling data from a SQL database using a Select command. I would like to use GridView's built-in "Edit, Update, Cancel"...
0
by: merco | last post by:
Hi. I have some problems using gridview bind to a datatable: i can't get updated values in then RowUpdating : i think the problem is that the...
3
by: slemen | last post by:
The controls (textboxes) in the gridview row being updated have the old, pre user updated values in the RowUpdating event. Does anyone have an idea...
9
by: John007 | last post by:
I am using a SQLDataSource to populate my gridview in ASP.Net 2.0. When I hit Edit, the textboxes appear and I am able to edit my values. When I hit...
1
by: Steve Kershaw | last post by:
Hi, I'm using the RowUpdating() event of an updatable GridView. I need to see the values of the columns in the updated row. There has got to be...
3
by: nick chan | last post by:
Hi i run into some difficulties getting rowupdating to fire when clicking Update link/button on gridview I set datasource at runtime, basically a...
0
by: steve | last post by:
I have been fighting with trying to update a GridView for a while. I don't want to use the "built-in" way to do it because I am using business...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.