WebGrid add pending changes from server-side

3 replies. Last post: October 21, 2011 4:18 AM by Hendrik Yulianto
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
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 times are GMT -5. The time now is 4:29 AM.
Previous Next