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

How to get modifed rows(i.e. Dirty rows) from RadGrid Template column view

6 Answers 799 Views
Grid
This is a migrated thread and some comments may be shown as answers.
systems
Top achievements
Rank 1
systems asked on 03 Sep 2015, 08:56 AM

Hello,

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?

Thanks,

Chetan

6 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 08 Sep 2015, 06:55 AM
Hi Chetan,

Do you want to achieve something similar to this functionality?
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
systems
Top achievements
Rank 1
answered on 09 Sep 2015, 03:00 PM

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.

Thanks,

Chetan

0
Konstantin Dikov
Telerik team
answered on 14 Sep 2015, 08:15 AM
Hi Chetan,

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).
 

Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
systems
Top achievements
Rank 1
answered on 16 Sep 2015, 02:47 AM

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?

Thanks,

Chetan

0
Accepted
Konstantin Dikov
Telerik team
answered on 18 Sep 2015, 02:56 PM
Hello Chetan,

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.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
systems
Top achievements
Rank 1
answered on 23 Sep 2015, 03:48 AM
Got it! Thanks much Konstantin.
Tags
Grid
Asked by
systems
Top achievements
Rank 1
Answers by
Eyup
Telerik team
systems
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or