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

[Solved] Help with GridView and Hierarchy relationship

1 Answer 139 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steven
Top achievements
Rank 1
Steven asked on 26 Aug 2010, 04:50 PM
Hi,

I have three data sources

Table A (Test_type, Test_Num)
Table B (Well_test_type, well_test_Num)
Table C (Source, Pressure_obs_no)

The relationship between A and B is from A.(Test_type+Test_num) => B.(Well_Test_type+well_test_num)
The relationship between B and C is from B.(Source + Pressure_obs_no) => C,(Source+Pressure_obs_no)

How does one show all the three tables in a hierarchy. In the relationship listed above, the addition sign determines the uniqueness.

Thanks

--------------------------
        <telerik:RadGridView x:Name="A" ActionOnLostFocus="None"  IsBusy="True" IsReadOnly="True" Margin="10,0,10,0" ShowColumnFooters="True">
          <telerik:RadGridView.HierarchyChildTemplate>
            <DataTemplate>
              <telerik:RadGridView x:Name="B"  ActionOnLostFocus="None"  IsBusy="True" Margin="10,0,10,0" ShowColumnFooters="True">
                <telerik:RadGridView.HierarchyChildTemplate>
                  <DataTemplate>
                    <telerik:RadGridView x:Name="C" ActionOnLostFocus="None"  IsBusy="True" Margin="10,0,10,0" ShowColumnFooters="True"/>
                  </DataTemplate>
                </telerik:RadGridView.HierarchyChildTemplate>
              </telerik:RadGridView>
            </DataTemplate>
          </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Aug 2010, 07:14 AM
Hi,

 You can use MVVM to bind your hierarchy - just create properties for child data and bind them directly in XAML:

<telerik:RadGridView x:Name="A" ActionOnLostFocus="None"  IsBusy="True" IsReadOnly="True" Margin="10,0,10,0" ShowColumnFooters="True">
          <telerik:RadGridView.HierarchyChildTemplate>
            <DataTemplate>
              <telerik:RadGridView x:Name="B"  ActionOnLostFocus="None"  IsBusy="True" Margin="10,0,10,0" ShowColumnFooters="True" ItemsSource="{Binding TableBChildData}">
                <telerik:RadGridView.HierarchyChildTemplate>
                  <DataTemplate>
                    <telerik:RadGridView x:Name="C" ActionOnLostFocus="None"  IsBusy="True" Margin="10,0,10,0" ShowColumnFooters="True" ItemsSource="{Binding TableCChildData}" />
                  </DataTemplate>
                </telerik:RadGridView.HierarchyChildTemplate>
              </telerik:RadGridView>
            </DataTemplate>
          </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>

Kind regards,
Vlad
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
GridView
Asked by
Steven
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or