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

Self-referencing Hierarchy and DetailTable count

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sohel
Top achievements
Rank 1
Sohel asked on 10 Aug 2010, 08:20 PM
Hi,

I have a self-referencing hierachical radGrid.  I am loading data thru the NeedDataSource event handler.  When I have 3 levels of hierarchy, the gridInstance.MasterTableView.DetailTables.count shows 1 , MasterTableViewDetailTables[0].DetaitTables.count is 1, so far so good. Now when I look at the last (the lowest level) GridTableView, its DetaitTables.Count is also 1 whereas this GridTableView does not have any children.  What am I missing? Is the DetailTables count always 1 when using Sel-Referencing Hierarcy? even for the GridTableView which has no chidren? Using RadControls for Ajax 2010_1_519 and Framework 3.5.

Thanks in advance for your help.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 16 Aug 2010, 09:14 AM
Hello Sohel,

Yes, the GridTableView.DetailTables collection indicates how many detail tables would be created per data item. For example, if you define 2 nested tables for the MasterTableView:

<telerik:RadGrid>
    <MasterTableView>
        <DetailTables>
            <telerik:GridTableView>
            </telerik:GridTableView>
            <telerik:GridTableView>
            </telerik:GridTableView>
        </DetailTables>
    </MasterTableView>
</telerik:RadGrid>

the RadGrid.MasterTableView.DetailTables would have 2 GridTableView items inside, even though some items may not have detail tables at all. So, effectively, the GridTableView.DetailTables collection indicates how many detail tables per level is there fore the GridTableView, not how many detail tables are showing for each item.

If you share with us what you are trying to implement, we may have a better approach for getting to know the number of initialized detail tables.

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