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

Best way of refreshing a grid if another grid is edited

3 Answers 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Felipe Casanova
Top achievements
Rank 1
Felipe Casanova asked on 30 Apr 2012, 11:34 PM
2 grids where 1 grid is populated with remote data and it is editable. On editing the grid by either adding a new record or changing an existing I'd like to update the other grid automatically. Is this possible?

The scenario is where the 2nd grid's columns comprise the data in the first column of the first grid so any changes to the first grid need to be displayed in the second as soon as possible. I've tried a few things and come up with a boolean flag which gets set on edit of the first and then the 2nd gets refreshed if the user tries to edit it but this is far from intuitive.

Thanks
Matt

3 Answers, 1 is accepted

Sort by
0
Pechka
Top achievements
Rank 1
answered on 01 May 2012, 06:00 AM
Hello,

You can combine the usage of the Save event of the first grid and the read method of the dataSource of the second grid.
0
Felipe Casanova
Top achievements
Rank 1
answered on 01 May 2012, 07:13 AM
Thanks but that would only work if there was a "save changes" button on the first grid wouldn't it? I'd like to do this without the user having to click that button though i.e. when the editing of the row is complete.
0
Rosen
Telerik team
answered on 03 May 2012, 07:45 AM
Hello Matt,

The saveChanges event will be raised when Save Changes button is clicked, as opposite to the save event, which will be triggered when record is changed. However, if both the grids are bound to the same DataSource instance they will be automatically synced when data in either one is changed.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Felipe Casanova
Top achievements
Rank 1
Answers by
Pechka
Top achievements
Rank 1
Felipe Casanova
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or