Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Disabling Sort Feature for a Specific Column

Sort Posts: Previous Next
  •  05-16-2008, 6:18 PM Post no. 12345

    Disabling Sort Feature for a Specific Column

    I have a DataGrid with a column containing CheckBoxes bound to a boolean value.  The header for this column also contains a CheckBox and I would like to disable the sort feature for this specific column.  The CheckBox in the header is used to perform a select/deselect all feature.  Currently, when the user clicks on the header containing the CheckBox, the grid will sort with respect to the boolean values of the CheckBoxes.  I don't want the rows to sort based on the CheckBoxes.  Is there a way to disable the sort functionality for just this one particular column, but still have the sort functionality for all of the remaining columns?
  •  05-17-2008, 9:36 PM Post no. 12352 in reply to 12345

    Re: Disabling Sort Feature for a Specific Column

    Unfortunately, there is no built-in feature that will allow you to disable sorting for a sepcific column. That said, you could:

    a- Create a new style  or template for the column's ColumnManagerCell that overrides the default behavior of sorting with it is clicked

    b- Handle the SortDescription's CollectionChanged event to prevent the column's sort description from being added to the collection.


    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.