WebGrid add pending changes from server-side

3 replies. Last post: October 21, 2011 4:18 AM by Hendrik Yulianto
Tags :
Fung InterMember

Hi,

Below is the scenario for my project.

  • I have a grid for user input
  • The grid's data-binding, layout and batch update is done at server side
  • The grid is paged
  • Call AcceptAllChanges (client-side) to invoke WebGrid1.BatchUpdate
  • Validation is done in WebGrid1.BatchUpdate (before write to Database, server-side). [ I wonder if there is any other events for the gird's data validation]
As I need to validate before updating data in Database; so I called "AcceptAllChanges" (client-side) to invoke the server-side "WebGrid1.BatchUpdate" event.

When Input is valid, everything goes fine. But if the input is invalid, all the Pending changes will be lost (since I call the AcceptAllChanges). Since the WebGrid is paged, so I can't use client-side to add back the pending changes. 

Is there any way that I could add the Pending changes back when the grid has invalid input, so that, the data inputted before "AcceptAllChanges" can stay on the grid for users to correct.
Or is there any Event of WebGrid can be provided for validation before the WebGrid.batchUpdate Event.

Thanks and Regards,
Fung

All Replies

Hello fung,

Your issue is under investigation, we need to further discuss with our developer teams. So, I hope you can be patient while waiting for the solutions.


Regards,

Hendrik

Thanks Hendrik,

Please update me if there is any other work around that I could used to finish my task.

Is there any way to "Cancel" the "Accept All changes" so that the pending changes can be stay in the grid once the data validation failed?


Regards,

Fung


Hello Fung,


As far as I know, In Our webgrid batchupdate also supports partial error. By this feature, the WebGrid is able to isolate erroneous changes, and continue to update the next changes that are unrelated to the previously failed changes update. 


Also if you set AutomaticObject Update in Batchupdate settings to true, the webgrid will be accept pending changes automatically. But if you want to do manually, you can specify when you want to accept all changes also specify which changes you want to accept. You can find sample about it in our WebGrid samples with name, BatchUpdate_CustomObjectUpdate.aspx. Hope this helps.


Regards,

Hendrik

All times are GMT -5. The time now is 2:36 PM.
Previous Next