B
Bill McCormick
I've got two huge books on WPF and can't find a solution for this:
I'm using the DataGrid from the toolkit where I set its ItemSource in code.
In the DataGrid.RowDetailsTemplate I have a couple of controls that need to
have binding's to a different Datacontext than the main Datagrid. I need to
know how to set the DataContext for the StackPanel that contains the
templated controls. The tree looks something like this:
<DataGrid Name="Foo">
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Name="Bar">
</StackPanel>
</StackPanel>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
and somewhere in the code I have:
MyBadAssGrid.ItemsSource= Db.FooList.OrderBy(f => f.FooName)
Anyone??
TIA, Bill
I'm using the DataGrid from the toolkit where I set its ItemSource in code.
In the DataGrid.RowDetailsTemplate I have a couple of controls that need to
have binding's to a different Datacontext than the main Datagrid. I need to
know how to set the DataContext for the StackPanel that contains the
templated controls. The tree looks something like this:
<DataGrid Name="Foo">
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Name="Bar">
</StackPanel>
</StackPanel>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
and somewhere in the code I have:
MyBadAssGrid.ItemsSource= Db.FooList.OrderBy(f => f.FooName)
Anyone??
TIA, Bill