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

RadGrid MasterTable Binding issue on DetailTable Binding

3 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sat
Top achievements
Rank 1
sat asked on 18 Dec 2013, 08:23 PM
Hi,

We have the RadGrid Hierarchical pattern implemented with server side data binding. The grid is 3 levels deep bound to 3 different tables. The Master Table Grid View will be updated at the client side as well the table data gets updated via jQuery AJAX call as a result of an user action.

After this, upon the Detail Table binding (Expanding/Collapsing any row hierarchy) we have the Master Table Grid View getting bounded to the old data, i.e., the master table grid view is not retaining the changes made at the client side rather getting bounded to the old data again there by losing client side updates to the Master Grid View!

Please suggest us the way to retain the client side updates to the Master Table Grid View upon expand/collapse or update Master Table Grid View data to the latest data from the source thereby not losing the row selection!

Thank you,

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 23 Dec 2013, 01:29 PM
Hello Sat,

In order to preserve the expanded state of the hierarchy, you can enable the following property:
<telerik:RadGrid ... RetainExpandStateOnRebind="true">

And this article demonstrates persisting the selection on rebinding operations:
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

Hope this helps.

Regards,
Eyup
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.
0
sat
Top achievements
Rank 1
answered on 26 Dec 2013, 03:54 PM
Thanks for the response but the question was different.

The Master TableView of the 1 level in the hierarchy is getting rebounded to the old data (the data that was fetched during the intiial load/binding of the grid) everytime when the respective node is expanded or collapsed.

We want the Master Table View  to retain client side changes or bind to the latest data everytime when the row is expanded.
0
Eyup
Telerik team
answered on 02 Jan 2014, 09:14 AM
Hello Sat,

You can make avail of the NeedDataSource and DetailTableDataBind events to control the sources dynamically depending on your specific requirements:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

And you will need to save the client-side modifications manually:
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

Please let us know if further questions arise.

Regards,
Eyup
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
sat
Top achievements
Rank 1
Answers by
Eyup
Telerik team
sat
Top achievements
Rank 1
Share this question
or