I see the three options for "Header Click Sort Action" to be default, multi column, and single column. Is there a way to disable sorting when single clicking? I want to change it to sort on double click.
Is there a way of adding an absolute value sort? The only options I see are ascending, descending, none, and disabled.
Thanks!
-Nick
Question -
Answer - The best way to sort columns other that asc or desc is to use a custom sort comparer. Create a new class which implemenets icomparable and on the initializelayout event of the grid / combo set column.sortcomparer property.
http://msdn.microsoft.com/en-us/library/system.icomparable.aspx
What I want is to do asc, desc, and abs desc, going through with each (double) click. One option is to change the sortcomparer in the AfterSortChange property, but I was hoping for something more elegant than managing the sort state myself.
If this is what I need to do, how do I define a custom sort comparer for built in types? The documentation for SortComparer says it takes to UltraGridCell values. The CompareTo method only takes 1 value.