Using rowupdating event gridview

You have to make sure that you aren't setting your Grid View's data when it is not postback.If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.When I hit Update, the changes are not saved, and there is no error message. When I hit Update, the changes are not saved, and there is no error message. 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. Yes, I did put the breakpoint at the Row Updating line (and not in the function).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.It is located in the Row Data Bound event of the parent gridview.Based on the code samples I have, the way the process should work when the edit button is clicked is the Row Command and then the Row Editing events for the child gridview are supposed to fire, followed by the Row Data Bound for the parent. I would recommend trying this out and starting a new thread in the .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.

using rowupdating event gridview-65using rowupdating event gridview-8

If you are using command buttons, then do not use Auto Generate Edit Button. The Row Update event will load a copy of the product table from the database after successfully updating a row. I subsequently changed the code behind to explicitly bind to the product table during Row Cancel and Row Edit events.-Frinny Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? It's quite common that people create the data source and bind this source to the Grid View in their Page_Load() method.What happens with this is that the source is being created every time the user submits the page.I have tried to add an event handler to the Row Updated event of my custom control but it is not called.I have tried to override On Row Updated in my custom control, but the breakpoint never gets hit.I also don't understand when I select the grid View control and look at the events in the Properties window of Visual Studio 2010 why I see all the proper event procedures listed for each event I expect to use. Much thanks to cpkilekofp and informaniac for their time and effort in trying to debug this problem for me. Data Bind in the Row Command when the Edit Command is invoked and removed it from Row Editing.The Edit, Delete and Insert events work as I expect. David Hi cpkilekofp; I removed the Insert command button and put in an event for Command to see if the Update button press in the grid View control would trigger the Command event - it did not. My markup and code look as follows and the Update event is not firing: Hi cpkilekofp; I removed the On Row Updating from the Grid View definition - to no avail. David I added a stub for the grid View Row Command event and set a breakpoint. Placed breakpoints at Row Command, Row Editing and Row Updating.The child events are firing after the parent though. This wouldn't be a problem except that I am retrieving the parent line that holds the child record being edited so that value can be fed to the javascript function to expand the row. Greetings everyone, I've got this page where I display a 3 level nested gridview.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “using rowupdating event gridview”

  1. Chatrandom har gjort det meget lettere at få kontakt end på andre sider, som Chatroulette, da vi ikke kræver at vores brugere opretter en konto, på denne måde kan du istedet fot fokusere på at møde fremmede.