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

Hierarchy grid RowStyle and HeaderRowStyle

1 Answer 41 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ivan Kopcanski
Top achievements
Rank 1
Ivan Kopcanski asked on 21 Apr 2010, 11:28 AM
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?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Apr 2010, 12:19 PM
Hello,

Can you post more info how this is related to RadWindow?

All the best,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Ivan Kopcanski
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or