Rowupdating event not firing

I bind the data on each postback which I think might be part of the problem. One thing I did notice is that is that when the update button is clicke... On postback the onservervalidate event fires twice EVERY TIME! I have duplicated this problem on multiple computers and it can be easly duplicated by placing a custom validator into a simple gridview. When I take a standard Grid View, bind it to a Data Table and dynamically wrap it in an Update Panel at run-time, the Row Updating event stops firing my handler. the View state is disabled because I need the the Grid View to be displayed even when there is no data. There is nothing else on the page, the onservervalidate control is not being called more than once and the autoeventwireup is set to false.

Object reference not set to an instance of an object.

I'm becoming very much inclined to believe this piece of code is bugged and that I will have to write my own version of the same control. How can I get this to fire during the rowupdating event?

Net way I had the right markup: I had originally placed the code under the Row Updated event, but after many, many, many repeated attempts of trying to get it to work I started looking for obtuse ways to accomplish the same thing. *Edit, I just thought I'd show this blog here (which I happened upon after hours of fruitless googling) and which explains the problem better than I have: SORRY! I don't think anyone ever saw the link I added above after I did an edit. If it doesn't meet the requirement, I want a message box to fire with the error statement and have simply an 'ok' button on it.

Collections;public partial class Shopping Cart : System. Check the following link below on how to: Grid View Insert, Edit, Update and Delete – The Ado. Gridview fire message box during rowupdating event During the rowupdating event of my gridview I am basically doing some validation on one of the fields.

Page be sure that you have this in your Grid View Declaration:onrowupdated="Grid View1_Row Updated" Also, if you are trying to write codes for updating Grid View data, then i guess you need to use Row Updating event instead of Row Updated.

Leave a Reply