I put a breakpoint on the Row Updating event handler and found that the event is not fired. I put a breakpoint on the Row Updating event handler and found that the event is not fired. In the Row Editing function, the edit textboxes appear and I can get the "old" values Then the page renders, I edit the textboxes and hit Update.

Right now, I have not written code for the Update event. Right now, I have not written code for the Update event. Then the page posts back, the text boxes go back to being labels and the new values are lost, and the Row Updating code never fires.

Do you have some sort of Java Script functionality that may be stopping it? A common problem people have with Grid Views is understanding when to data bind the data source to the Grid View.

rowupdating event in gridview not firing-27

I have set the requisite attributes in the Grid View tag. As noted by Asem and Ron, adding the Causes Validation="false" attribute to the Command Field resolved the problem.

(Note, in the gridview the One strange thing that I've noticed that makes me think it's a View State problem is that if I change the Command Name of the Update button to "Edit" that postback event does get captured in the Row Command event... The reason was that I had some other validation controls on the page and on the Grid View update the page was firing the other validation controls, so I think its better to set a Validation Summary property.

I have set the requisite attributes in the Grid View tag. I removed the master page and let the page that contained the Grid View inherit from Page, and it worked.

(Note, in the gridview the Enable View State="False" - if I set it to True I get the standard "Failed to load viewstate. error) One strange thing that I've noticed that makes me think it's a View State problem is that if I change the Command Name of the Update button to "Edit" that postback event does get captured in the Row Command event... Something in my inheritance stack (or something in the MS controls) didn't work the way I had it set up.

protected void Grid View1_Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. New Edit Index; Sql Connection con = new Sql Connection("Data Source=MEHDI-PC\\SQLEXPRESS; Initial Catalog=PIMS; Integrated Security=True"); string sql = "select [Dwg Reg ID],[Ref],[Dwg_Ref],[Title],[Dwg_Received_Date],[Rev],[Trade],[Type],[Produced_Date],[Produced_By],[Submittal_Ref],[Issued_To],[Date_Issued],[Purpose],[Status],[Action_Date] from dbo.

Open(); Sql Data Adapter adp = new Sql Data Adapter(sql, con); Data Set ds = new Data Set(); adp.

If you are using command buttons, then do not use Auto Generate Edit Button.

I have a Gridview with Auto Generate Columns="False".

NET Forum so that other people can learn from the experience too. -Frinny You may need to turn off validation even if you are not validating anything.

It seems like the Java Script can get mangled otherwise.

You should create your data source once (on the user's first visit) and store it into Session for later use, and only bind the Grid View to the data source when it is necessary to do so.