I have implemented a hierarchical grid based on the example provided on the Telerik site. This works fine.
However, I am having difficulties binding to properties in my viewmodel from the code behind and the example given seems to bind only to objects in the top level RadGridView's ItemsSource. Although I can continue working in the code behind I would like to see an example of not using the DataLoading eventhandler and sticking with XAML to define the columns for the child rows.
I am unable to find any example of placing the
So basically, what I am asking is to be able to do something like the following, where I can handle the table's columns in XAML...
However, I am having difficulties binding to properties in my viewmodel from the code behind and the example given seems to bind only to objects in the top level RadGridView's ItemsSource. Although I can continue working in the code behind I would like to see an example of not using the DataLoading eventhandler and sticking with XAML to define the columns for the child rows.
I am unable to find any example of placing the
<
telerik:RadGridView.Columns
>
or its equivalent section within the ChildTableDefinitions. Surely this must be possible, as these child rows in my case, anyway, contain merely a subset of the columns in the main RadGridView control.
So basically, what I am asking is to be able to do something like the following, where I can handle the table's columns in XAML...
<
telerik:RadGridView.ChildTableDefinitions
>
<
telerik:GridViewTableDefinition
>
<
telerik:GridViewTableDefinition.Relation
>
<
telerik:TableRelation
IsSelfReference
=
"True"
>
<
telerik:TableRelation.FieldNames
>
<
telerik:FieldDescriptorNamePair
ParentFieldDescriptorName
=
"BankStatementTranID"
ChildFieldDescriptorName
=
"ParentStatementTranID"
/>
</
telerik:TableRelation.FieldNames
>
</
telerik:TableRelation
>
</
telerik:GridViewTableDefinition.Relation
>
<
telerik:RadGridView.Columns
>
...My XAML column code here...
</
telerik:RadGridView.Columns
>
</
telerik:GridViewTableDefinition
>
</
telerik:RadGridView.ChildTableDefinitions
>