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

hierarchy disallowing multiple expanded parents

3 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 08 Sep 2010, 05:19 PM
I have a hierachal radgrid.
The problem I am having is that it only allows a single parent to have it's children expanded at a time.

If Parent row 1 is expanded,
then I click to expand Parent row 2
-- Parent row 1 collapses, then Parent row 2 expands.


I do not want the row to collapse automatically.
I want to be able to have multiple rows be expanded at one time (and I have done this many times without a problem! )

I understand from this:
http://www.telerik.com/help/aspnet-ajax/grdsingleexpandinhierarchicalgrid.html

that the grid should not behave this way be default... but I did not implement any code to affect this functionality. 
Is there a setting or somewhere I should look to correct this?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Sep 2010, 12:32 PM
Hello Matthew,

By default when you rebind a parent table in hierarchical grid the settings/expanded state for the nested tables will be lost. This is because the refresh action resets all previous settings applied for the nested controls to avoid ViewState inconsistencies/unexpected behavior.
 
Please examine the code library below which represents how to retain the expanded/selected state for grid items in hierarchy upon a rebind command and let me know if it works for you:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/retain-expanded-selected-state-in-hierarchy-on-rebind.aspx

Best wishes,
Pavlina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Matthew
Top achievements
Rank 1
answered on 09 Sep 2010, 05:43 PM
Expanding the child rows shouldn't cause the parent row to rebind()... at least I've never noticed it before.

Under what circumstances will expanding a child rows cause a parent to rebind and do you have any suggestions for preventing this behavior?
0
Pavlina
Telerik team
answered on 10 Sep 2010, 12:30 PM
Hello Matthew,

The described behavior is expected. Note that ExpandCollapse command makes an implicit call to the Rebind() method of RadGrid in order to refresh the control's content and fetch the latest information from the grid source.
Commands that invoke Rebind() implicitly

Greetings,
Pavlina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Matthew
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or