Hi,
I have a AJAX Enabled Grid bound with ObjectDataSource. When I make changes to cell(s), Update Row is getting called once for every row changed(as expected).
Finally when I click 'Submit' button to send the changes to database, what happens is Update Row method is called twice. Once before execution of submit_click method (as expected AJAX call for last edited row) , but once more after submit_click method is executed.
This is weird. Any idea why is it happening?
ThanksNJ
Hi NJ,
Thanks very much for your feedback. An internal bug report has been created, and I will notify you as soon as it gets fixed.
Regards,
Angel
Hi Angel,
Thanks for your reply. How early could I expect the reply?
As this is major issue for me and it is occurring on all the pages across whole project wherever I have used UltraWebGrid.
I appreciate your efforts in advance. Please inform me when it gets resolved.
Thanks
NJ
We will do our best to include it in the next hotfix. I will let you know as soon as possible. Thanks
We are experiencing the same problem, also I might add that in my case the UpdateRow event that is being fired is not always the correct one. For example sometimes I get a mixed result from the newly inserted row and a previous one already in the grid.
I'm planning to just ignore the events if the IsXmlHttpRequest property is set to false, but haven't tested enough yet to confirm if this is a good option.
Any news on this getting fixed anytime soon?
Hello NJ,
Just wanted to let you know that we did detailed analysis and debugging on the issue you reported, and it is indeed a tricky one. However, I am afraid this is not something that we can address in a hotfix easily - I just want to let you know what the background of the problem is first and then suggest a workaround.
Basically, the grid is set up to update on blur, so if you update a row, and click outside of the grid, the ajax request goes off and starts firing the update events. In this case though, the object that blurs the grid is a postback button, so it starts it's job at the same time.
Now when you are working with the grid, it keeps track of what you are doing, so it can fire the appropriate change events on the server. When the AJAX request goes back and comes to the client again, it can then dump the transaction list. (so if something goes wrong it can be recovered). This mechanism is also used by the control in a regular postback scenario.
Now when you have this double up action of blur + post, that content gets sent back 2x and the server handles both of them. We can't clear out the collection until we know the AJAX action is done, and we can't not send back the information on the post because people have asked for bug fixes in this area, and we need to send back changes undone at that time.
The workaround - you may modify the sample, so that when the request is going back (or the row updating) you disable your post buttons, and then when the ajax request is finished, you then re-enable the buttons, or something similar to that.
Please, excuse us for the inconvenienice and we hope that this helps.