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

[Solved] Breaking issue in GridView Q2 2009 in DataContext="{Binding MasterRecord.Data}"

2 Answers 75 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.
Jingying Wu
Top achievements
Rank 1
Jingying Wu asked on 06 Jul 2009, 10:26 PM
My code is similar to the FirstLook example with childhierarchy.
I just updated the binaries and i realised that the children now no longer gets the data.
in the Details tab, there's a textbox that's bound to ID.

This field is available in the grid, there's no change anywhere else.
Is DataContext="{Binding MasterRecord.Data}" replaced with something else?
thanks in advance.
jy


 

 

 

<grid:RadGridView.HierarchyChildTemplate>

 

 

 

 

 

 

<DataTemplate>

 

 

 

 

 

 

<StackPanel Background="#FF525252" Orientation="Horizontal">

 

 

 

 

 

 

<navigation:RadTabControl x:Name="TabControlIndicator" Style="{StaticResource RadTabControlStyle}" BorderBrush="#FFF6F6F6" BorderThickness="0 1 0 0" Margin="30,30,30,30" controls:StyleManager.Theme="Vista" SelectionChanged="TabControlIndicator_SelectionChanged">

 

 

 

 

 

 

<!-- Details Tab -->

 

 

 

 

 

 

<navigation:RadTabItem Header="Details" Tag="DetailsTab" DataContext="{Binding MasterRecord.Data}" Margin="20,0,0,0" Height="24" FontWeight="Bold" FontSize="11" Foreground="Black" >

 

 

 

 

 

 

<localControls:SubTableIndicator_Details x:Name="IndicatorDetails"/>

 

 

 

 

 

 

</navigation:RadTabItem>

 

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Jul 2009, 05:28 AM
Hello Jingying Wu,

You do not need to set this with the new version. RadGridView will set the DataContext automatically to the parent data object - you can check our First Look demo for more info.

Best wishes,
Vlad
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.
0
D. Omar
Top achievements
Rank 1
answered on 21 Jul 2009, 06:42 PM
Doing it as in the Q2 2009 FirstLook example sets the DataContext of my control in the HierarchyChildTemplate to the same object as the parent record. How can I set the DataContext of a Control that is defined within the HierarchyChildTemplate to the Child object based on the TableDefinition on the grid? I am using a TableRelation.
Tags
GridView
Asked by
Jingying Wu
Top achievements
Rank 1
Answers by
Vlad
Telerik team
D. Omar
Top achievements
Rank 1
Share this question
or