Home Forums WPF controls Xceed DataGrid for WPF Custom sorting – displaying the sort glyph

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

    We have some grid columns that display icons that I’ve implemented a custom sort for by using a different field in the collection and manually doing the SortDescriptions.Add. Can you give me some pointers on how to manually display the sort glyph?

    Imported from legacy forums. Posted by Lori (had 572 views)

    Xceed Support
    Member
    Post count: 5658

    In the ColumnManagerCell’s template, there is a ContentPresenter that is used to display the sort glyph and a DataTrigger that checks the parent column’s SortDirection property to display either the ascending or descending sort glyph and make the ContentPresenter visible or hidden.

    Hope this helps!

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

    User (Old forums)
    Member
    Post count: 23064

    Because this is a custom sort (I’m sorting by a different field in the collection than the one is displayed), the parent column’s SortDirection property is never changed. I can’t manually set the parent column’s SortDirection property because it is read-only.

    Imported from legacy forums. Posted by Lori (had 3433 views)

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