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

[Solved] RadGrid Hierarchy behavior

1 Answer 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mustansir
Top achievements
Rank 1
Mustansir asked on 21 Apr 2009, 08:15 PM
Hi,
I've 2 level hierarchy. I followed the example as given in the demo "Programmatic Binding". However, I did a few variations in the code.
Firstly, my datasource is not from a SQL table rather it was set to a default  view of a datatable.
Secondly, my datasource is set on PageLoad and not on OnNeedDataSource event.
Thirdly, I do not specify the datakeynames attribute.
In my code behind I set the data sources for the inner detail table on "OnDetailTableDataBind" event.
The problem is I get my first level hierarchy expanded correctly. However, on expanding the second level hierarchy, it does not expand rather it collapses the first level hierarchy too.
I get the "OnDetailTableDataBind" event whenever the first level hierarchy is expanded but I do not get this event fired any time when the second level hierarchy is expanded.
Any reasons why is this behavior ? I assume my logic of setting the datasources are correct since my first level hierarchy is working.

Any help will be appreciated.

Mustansir.

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 24 Apr 2009, 01:59 PM
Hi Mustansir,

You do need to use the NeedDataSource event for the grid to function properly.

Please, review the following online examples for more information: Advanced data binding vs. Simple data binding.

I hope this helps.

All the best,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Mustansir
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or