In SfDataGrid, the AllowFiltering and AllowSorting property allows you to perform filtering and sorting operations on data. You can define the AllowFiltering and AllowSorting property either at SfDataGrid or Column level.
By default, the FilterToggleButton and SortIcon appears at the right of the HeaderText .The following screenshot illustrates the default position of the FilterToggleButton and SortIcon in GridHeaderCellControl.
Figure 1: Default position of the FilterToggleButton and SortIcon
You can change the above default position to left of the header text by customizing the Header style. The following steps help you to change the position of FilterToggleButton and SortIcon in header cell.
Right-click SfDataGrid in the Visual Studio or Blend Designer view and select Edit Additional Templates -> Edit HeaderStyle-> Edit a Copy.
Figure 2: Editing Header Style
A new window opens and in that window, mention where you want to define the template and then click OK.
Figure 3: Create Style Resource window
The GridHeaderCellControl template is added in the XAML page and you can change the positon of FilterToggleButton, SortIcon and HeaderText in PART_HeaderCellBorder of the control template set as illustrated in the following code example.
The following screenshot displays the position change of SortIcon, FilterToggleButton from right to left position of the HeaderText.
Figure 4: After changed the position of FilterToggleButton and SortIcon
Refer to the following sample link for changing the position of the FilterToggleButton and SortIcon on the Header cell in WPF platform,
This page will automatically be redirected to the sign-in page in 10 seconds.