Home Forums WPF controls Xceed DataGrid for WPF Disable Sort Option

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

    Hi,

    how can i disable the column sort option. is it possible.

    Imported from legacy forums. Posted by rajendernag (had 2085 views)

    Xceed Support
    Member
    Post count: 5658

    Sorting in the DataGridControl’s is done only if the data source supports sorting. The easiest option is to ensure that your data source does not support sorting (refer to the CollectionView.CanSort property documentation).

    Alternatly, if you cannot change the data source sorting capabilities, you can add a class handler on the ColumnManagerCelll class and in the handler, ensure that you set “e.Handled=true”, this way, the column header will not be able to perform sorting (nor grouping).

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2772 views)

    User (Old forums)
    Member
    Post count: 23064

    I am very new to Xceed and XAML, could you give me a piece of code how to add a class shandler in ColumnManagerCell, and ensure e.Handled=true?

    Thank you,

    Freejack

    Imported from legacy forums. Posted by Freejack (had 798 views)

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