We only want our customers to sort by certain columns and not by others. How can I turn off sorting for some columns, but not all of them?
Greg
Hi Greg,
You should be able to hook into BeforeSortChange and cancel the event if one of the columns in the eventArgs.SortedColumns happens to be one of the columns you don't want the end user to sort.
Sandip
That worked, but it seems like SortIndicator.None should do the trick, but it doesn't. Why not?
SortIndicator indicates how the column is currently sorted. It has nothing to do with whether the column can be sorted or not.
Hm. Actually, it just occurred to me that I am wrong. You can set the SortIndicator on the column to SortIndicator.Disabled.
Ok, thanks for your help. I really appreciate it.