Hi,
I have a situation where I have successfully shown data in a ParentGrid, but now I have setup a child grid but cant get it to display data.
XAML:
<telerik:RadGridView Name="CustomersGrid" ShowInsertRow="True" Grid.Column="0" SelectionChanged="CustomersGrid_SelectionChanged">
<telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition/>
</telerik:RadGridView.ChildTableDefinitions>
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<telerik:RadGridView Name="ChildGrid" ShowInsertRow="True" Loaded="ChildGrid_Loaded" />
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>
C#:
public MainWindow()
{
InitializeComponent();
var customers = Repo.GetCustomers();
CustomersGrid.RowIsExpandedChanging += CustomersGrid_RowIsExpandedChanging;
CustomersGrid.ItemsSource = customers;
DataContext = this;
}
This works fine and shows the child grid when clicking on the + sign. The ParentGrid is bound to Customers (Select * FROM Customers) I need to know how to bind the child grids to Agreements (Select * From Agreements where CUST_NO = '" + CUST_NO + "'"). I cant seem to access the Child Grid's itemsource to set the data binding.
What am I doing wrong?
Thank you very much!
Ron