Hi, I'm trying to allow some columns to be selectable while preventing column selections on some other columns in the WinGrid.
I've used the BeforeSelectChange event to cancel the selection when the selection type is column header and the appropriate column is being selected (I check the NewSelections collection to see which columns have been selected).
This mostly works (some problems with multi-column selections), however when the selection is cancelled it seems to disable the column moving and Outlook-style grouping functionality (the drag and drop bit) as well.
I want the non-selectable columns to be groupable and re-arrangable, and the selectable columns to be just selectable.
Anyone got any ideas on how this can be done?
Thanks,
John.
I've disabled the sorting on all columns by setting HeaderClickAction to 'Select' (I'm going to handle the sorting externally).
My problem is trying to disable column selection for some columns without removing the column grouping or moving functionality. Cancelling the selection of a column in the BeforeSelectChange event seems to stop the group by and column moving functionality from working.
Is there any other way of having a mixture of selectable columns and non-selectable columns?
For the columns you don't want to be sortable, set that column's SortIndicator property to SortIndicator.Disabled.
I don't know if this will impact the Outlook group-by functionality, since sorting and grouping are tightly coupled.