This is a migrated thread and some comments may be shown as answers.

Single method to handle SubmitChanges when in Batch Edit Mode

0 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 2
Shawn asked on 08 Aug 2012, 01:20 PM
Currently we use a grid in batch edit mode.  When we click save changes, then the controller's Update method is called passing it all the updated rows.  Then the controller's Create method is called, passing it all the added rows.  Then the controller's delete method is called, passing it all the deleted rows.
Is it possible to, ( or if not, would you consider adding the feature) to configure the datasource to call a single "SaveAllChanges" controller method instead, which contains 3 parameters, one for the changed rows, one for the added rows and one for the deleted rows?
This is to enable scenarios in which the collection of rows needs to have validation applied that takes all rows into account.  For example, the items in the collection may not exceed a certain total Qty.  So if a user deletes one row, and adds another row, the controller will execute the Create method first, and this could cause a failure of the validation because of a defined Max Qty for all rows being exceeded; meantime the removal of the deleted row will actually cause validation to pass, but the Create method of the controller cannot know that when processing its validation.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Shawn
Top achievements
Rank 2
Share this question
or