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

grid hierarchy problem

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 05 Jul 2010, 01:22 PM
Hello,
I have problem with hierarchy expansion:
I have a Master Grid with 2 chilidren a the same level, One Children has another child.

In the last child i user template columns and i have a button to post data.

I'm able to refresh all grid from master to last child after postback but the last child is always closed even if the parentItem's expanded property is true.

i tried to expand the child in the pre-render, to use ExpandHierarchyToTop method, to fire the Expand event manually  but it doesn't work.

Any Ideas??  
P.s.
i user LinqDataSource with it's selecting event, and i set the datasource ID programmatically to control when databind fires.

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Jul 2010, 10:32 AM
Hello Marco,

You can refer the following Code Library which illustrates how to retain the expanded/selected state for grid items in hierarchy upon a rebind command.

Retain expanded/selected state in hierarchy on rebind

Thanks,
Princy.
0
Marco
Top achievements
Rank 1
answered on 06 Jul 2010, 10:46 AM
I don't use the Rebind method.
In the ItemCommand event i have all the information about the item i want to expand.

so i set the expanded property to true and after that the databind events is correctly fired, but after bind the item is not expanded
Tags
Grid
Asked by
Marco
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Marco
Top achievements
Rank 1
Share this question
or