In SfDataGrid, when you apply style for the StackedHeader, it is applied for all the StackedHeaderColumn, by default. To set the different Style for each StackedHeaderColumn, you need to derive a new class from the GridStackedHeaderCellRenderer and override the OnInitializeEditElement(). You can refer to the following code example to derive a new class from the GridStackedHeaderCellRenderer. C# The following code examples illustrate how to define the multiple styles for the GridStackedHeaderCellControl. XAML You can apply the above style for GridStackedHeaderCellControl based on the ColumnIndex in the OnInitializeEditElement method. You can refer to the following code example to override OnInitializeEditElement(). C# You can refer to the following code example to remove the default GridStackedHeaderCellRenderer and add the derived GridStackedHeaderCellRenderer to the renderer’s collection in the SfDataGrid. C# The following screenshot shows the applied different style for the StackedHeaderColumn.
Sample Links |
This page will automatically be redirected to the sign-in page in 10 seconds.