Hi,
I have working styles for RowStyle and HeaderRowStyle for the common RadGridView row styles.
You can find the related xaml in the next post answer.
The styles used like this are working (cc:RadGrid is RadGridView inherited class):
<cc:RadGrid Style="{StaticResource ListScreenGridViewData}"
RowStyle="{StaticResource ListScreenGridViewRow}"
HeaderRowStyle="{StaticResource GridViewHeaderRowStyle}" />
And when they are used in hierarchy grid they don't work:
<cc:RadGrid x:Name="gvFreeFieldsUpdate"
IsScrolling="True"
Style="{StaticResource CustomerDetailsFreeFieldsGrid}">
<cc:RadGrid.HierarchyChildTemplate>
<DataTemplate>
<StackPanel>
<cc:RadGrid
AutoGenerateColumns="False"
IsFilteringAllowed="True"
x:Name="gvChild"
Loaded="gvChild_Loaded">
</cc:RadGrid>
</StackPanel>
</DataTemplate>
</cc:RadGrid.HierarchyChildTemplate>
</cc:RadGrid>
code-behind:
public TabFreeFieldsView(IUnityContainer unityContainer, ITabFreeFieldsViewModel viewModel){InitializeComponent();_unityContainer = unityContainer;this.ViewModel = (IViewModel)viewModel;this.DataContext = this.ViewModel;this.gvFreeFieldsReadOnly.AddColumns(viewModel.FreeFieldsColumns);this.gvFreeFieldsUpdate.AddColumns(viewModel.FreeFieldsColumns);GridViewTableDefinition definition = new GridViewTableDefinition();definition.Relation = new PropertyRelation("FreeFieldValues");this.gvFreeFieldsReadOnly.ChildTableDefinitions.Add(definition);this.gvFreeFieldsUpdate.ChildTableDefinitions.Add(definition);
}
The problem is that ListScreenGridViewRowTemplate contains template for the row.
If this template is left out, the hierarchy grid works (the child grid view is shown),
but the default theme styles are applied and also the column headers in the header row
are forced with template.
I won't my custom header style and row style to be applied both in the root and in the child grid.
Could you help us with this issue?