Home Forums WPF controls Xceed DataGrid for WPF Sorting for DataGrid Columns

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24444 |

    Can I set the sort order for the DataGrid Columns from code-behind?

    The Property SortDirection only has a Getter, is there a way to work around this?

    Cheerios,
    Serene

    Imported from legacy forums. Posted by Serene (had 393 views)

    Xceed Support
    Member
    Post count: 5658

    If you are using the DataGridCollectionView (recommended) then you can add the desired SortDescription structs to its SortDescriptions collection.

    If you are not using the DataGridCollectionView, you can add the SortDescription structs directly to the grid’s Items.SortDescriptions collection.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 2857 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.