[]
        
(Showing Draft Content)

Sort Indicator

FlexGrid displays sort indicator, a small triangular arrow sign, to indicate the direction of sorting. The grid also provides flexibility to hide, display, or customize the indicator.

Hide or Display Sort Indicator

FlexGrid, by default, displays the sort indicator when a column header is clicked to sort the columns. However, you can hide the indicator by setting the ShowSort property to false.

Use the code below to hide the sort indicator displayed on the sorted WinUI FlexGrid column.

// Hide or Display sort indicators in column headers
flexGrid1.ShowSort = false;

Customize Sort Indicator

FlexGrid provides the SortIconPosition, SortAscendingIconTemplate and SortDescendingIconTemplate properties to customize sort indicator. The SortIconPosition accepts values from GridSortIconPosition enumeration, while the SortAscendingIconTemplate and SortDescendingIconTemplate properties accept values from the C1IconTemplate class.

// Customize Sort Indicator
flexGrid1.SortIconPosition = GridSortIconPosition.Inline;
flexGrid1.SortAscendingIconTemplate = C1IconTemplate.TriangleLeftUp;
flexGrid1.SortDescendingIconTemplate = C1IconTemplate.TriangleLeftDown;