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

Grid editmode batch

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ShahabG
Top achievements
Rank 1
ShahabG asked on 27 Jun 2013, 02:46 PM
Hi
I have 4 grids on batch mode on a page, I have to updated all of them in once with a Save button, How do I get only the records which are changed in each grid?
Thanks

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 02 Jul 2013, 08:48 AM
Hello Shahab,

This is achievable by subscribing to the OnBatchEditCommand for every RadGrid and extracting the values from the arguments. A demonstration of this is shown in the code snippet below:
protected void RadGrid1_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
    {
        foreach (GridBatchEditingCommand command in e.Commands)
        {
            GridDataItem item = command.Item;
            Hashtable newValues = command.NewValues;
            Hashtable oldValues = command.OldValues;
        }
    }


Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
ShahabG
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or