Skip to main content

Multiple Sort

Comments

1 comment

  • Dapfor Team

    Hi,

    In order to set multiple sorting you should sequentially specify the sort direction for the selected columns. Each new property call adds a new level in the sorting. To cancel the sorting, simply call the Header.SortedColumns.Clear() method. You can also use the Header.SortedColumns to iterate columns.

    Note, the same approach is used for all other containers like Header.FixedColumns, Header.VisibleColumns, Grid.Selection etc...

     

    grid.Headers[0].SortedColumns.Clear();
    grid.Headers[0]["Column1"].SortDirection = SortDirection.Ascending;
    grid.Headers[0]["Column2"].SortDirection = SortDirection.Descending;

     

    Best regards,

    Dapfor

     

    0

Please sign in to leave a comment.

Powered by Zendesk