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

DetailTables[0].Rebind()

3 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Linda Bearden
Top achievements
Rank 1
Linda Bearden asked on 19 Jun 2008, 07:35 PM

I have a Hierarchy grid with a custom filter control on the page as well. I need to be able to rebind the grid after I select the filter string from the custom control. ReBinding the MasterTableView works great but I cannot get the 1st and only details table to rebind.

Is there any way to use radgrid.MasterTableView.DetailTables[0].Rebind(); from say a linkbutton command routine. I've done all I know.

Thanks for your help!

3 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 20 Jun 2008, 01:10 PM
Hello Linda Bearden,

Thank you for contacting us.

When you have a hierarchical grid control and bind MasterTableView there is event fired for the DetailTableView. The event is DetailTableDataBind. This event is fired depending on what is set in HierarchyLoadMode. If it's set to ServerBind the event is fired when the corresponding parent item is bound. If it's set to ServerOnDemand  the event does not occur until the detail table's parent item is expanded. Your code may listen for this event and then apply your custom filtering for the detail's tables.

Here is a link with all the details explained:
http://www.telerik.com/help/aspnet-ajax/grdhierarchicaldatabindingusingdetailtabledatabind.html

I hope that answers your question.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mark
Top achievements
Rank 1
answered on 26 Jun 2008, 08:17 PM
I have a hierarchy in my grid with some dropdown type filters at the top. I'm not using the radgrid filters.

When the user expands a parent node the data in the child is shown. One of the dropdown filters on the page needs to rebind the DetailTables. The dropdownlist is set to autopostback and the page refreshes. That causes all the nodes to closed. The user then has to go back and open the node they were looking at to see the changes to the DetailTables.

Is there a way to refresh the DetailTables section without doing a full postback?
0
Shinu
Top achievements
Rank 2
answered on 27 Jun 2008, 05:06 AM
Hi Mark,


Here is a code library which explains how to retain the expanded/selected state for grid items in hierarchy upon a rebind.
Retain expanded/selected state in hierarchy on rebind

Shinu.
Tags
Grid
Asked by
Linda Bearden
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Mark
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or