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

Customize Group Header Indicator and Group Row Indicator

2 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 04 Mar 2019, 06:20 PM
I have an application where I do grouping behind the scenes with an ICollectionView.  I have the group panel and row indicator hidden.  When I do using the ICollectionView, I get a row indicator in the header and for each row.  I'd like to change the border color of the header indicator space to transparent and the row indicator to match the background of the main grid.  I've looked around the different templates and can't figure out which is the right one.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 07 Mar 2019, 12:02 PM
Hello Dan,

Based on the image you provided, I assume that you're using the Expression_Dark theme. Please let me know if I'm mistaken in this assumption.

For this particular theme, you can create styles targeting the respective indent cells, namely the GridViewHeaderIndentCell and GridViewIndentCell elements.

<Style BasedOn="{StaticResource GridViewHeaderIndentCellStyle}" TargetType="grid:GridViewHeaderIndentCell">
    <Setter Property="Background" Value="Red" />
    <Setter Property="BorderBrush" Value="Yellow" />
</Style>
 
<Style BasedOn="{StaticResource GridViewIndentCellStyle}" TargetType="grid:GridViewIndentCell">
    <Setter Property="Background" Value="Red" />
    <Setter Property="BorderBrush" Value="Yellow" />
</Style>

Please note that if you're using the StyleManager approach for setting the theme (with the Xaml assemblies), you should omit the BasedOn attribute.

For your convenience, I've also prepared a small sample project as a demonstration.

Please have a look and let me know if a similar approach would be applicable at your end.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Dan
Top achievements
Rank 1
answered on 07 Mar 2019, 02:53 PM
Thank you for your reply Dilyan.  This little snippet has solved my issue.  I was actually not using the dark theme, but rather a heavily customized style.  I just omitted the BasedOn and it worked great.
Tags
GridView
Asked by
Dan
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Dan
Top achievements
Rank 1
Share this question
or