I'm loading an UltraWebGrid control thats bound to a SqlDataSource. I then filter the SqlDataSource and databind the UltraWebGrid and the grid displays as expected. The user then make changes to the grid and then clicks on an urelated button on the form. When this happens, the grid reloads without retaining any changes or previously applied filter. How can I have the user click the button without the grid reolading and loosing any previously entered user data?
Thanks in advance for any replys.
Wrapping the other controls in an update panel works, but how would I handle the user clicking on of the grid buttons? I don't want to commit changes to the database simply because the user hit a "lookup button" on the grid. Is there no way to set a trigger event for the update batches?
The WebGrid has had AJAX support dating back to 2004 actually. 2006 volume 3 supports AJAX updating - to enable it take a look at the following help topic - http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebGrid_Xml_Rendering_and_Xml_Load_on_Demand.html
-Tony
Hi Tony,
I am facing the same issue with the UpdateRowBatch event. You mentioned above to use AJAX but I have never used AJAX before, so is it possible for you to provide with with some sample code? I read on your website and you have described a solution for a later version of the webgrid but I needed this for version 2006 Volume 3 CLR 2.0.
THanks,
hs2
I'm guessing you're using the UpdateRowBatch event on the grid. That event will defer firing until the page is posted back through some other mechanism. Unfortunately, any postback will trigger the updaterowbatch event to fire. Once the event fires, you have to push the changes to your database, or they will be lost. The workaround is to make sure that the grid never get's posted back until you're ready to handle the data changes. You can do this with AJAX by wrapping other controls in an UpdatePanel. For example, your button (and any controls it needs to modify during the postback) would go into an UpdatePanel, so that they can be posted back separately from the grid control.
Hope this helps,