We have a in place editable grid with Template columns & with single save button outside the grid. Usually grid consist of monthly dates and I need to update/edit only few dates from it.
I am looking to find out a way through which i can get only modified rows from grid in my save button handler. I know by default there is no IsDirty flag for RadGridRow so any thoughts around accomplishing this?
6 Answers, 1 is accepted
Do you want to achieve something similar to this functionality?
Not really Eyup, I had looked at this Batch edit demo already.
Our case is - Lets say I edit only first row, then In Save handler can I get only modified rows(First row in this case) instead of all current page rows.
So, selective dirty rows to be identified and proceed with only those rows to saving to database and ignore the rest untouched rows.
The functionality that you require is available only with Batch edit mode, where a dirty indicator will be placed within the edited cells and furthermore, the server-side OnBatchEditCommand event will be fired only for the rows that were modified.
For the other edit modes (like the InPlace edit mode), such functionality is not available, mainly because each operation should be performed per row (through the Update, Insert or Delete buttons).
Thank you Konstantin for sharing the details.
I have no choice to switch to Batch edit mode now. Will do so.
Btw, In batch edit mode do we need to loop through all of the Rows to identify the dirty flag or i will be getting a collection of dirty rows only in BatchEdit command?
With Batch Editing, when you click on the Save Changes button, the Commands collection from the OnBatchEditCommand event arguments will contain only the rows that were edited, inserted or deleted.
Detailed information about Batch Editing could be found in the following help article:
Hope this helps.