Call me stupid but I can't seem to track down the property to disable column sorting. I dont want users to be able to use this feature.
A hint please?
Many thanksJason
UltraGrid provide 2 mode when click Header: Sort or Select Column
In order to disable Sor, set property HeaderClickAction = Select.Ex: UltraWinGrid.DisplayLayout.Override.HeaderClickAction = Select
If you dont want to Select column after set HeaderClickAction = Select, set property:
UltraWinGrid.DisplayLayout.Override.SelectTypeCol = None
Goodluck
Thanks. Worked like a charm.
When you say the column is marked, are you meaning that the entire column is selected or highlighted or are you meaning that the column header itself is selected? I ask as I have grids where I have both happening.
CheersJason
Hi!
I mean that the entire column is selected/highlighted. The column header isn't highlighted at all, just the column underneath.
/dahrlin :-)
Setting SelectTypeCol to None (as the sample code above shows) should prevent the column from being selected.
Thank you all for your assistance!
Well... right now I am at home and don't have the source code available. But I am sure I've set the properties according to what was described above.
Any other properties which could disturb the desired behavior?
Have a nice day!
Hi,
If you set set SelectTypeCol to None and clicking the column header still selects the entire column, then something is wrong. There are no other properties that would override this setting. Either you are re-setting this property in code or else your code is doing something else that is causing the behavior. Maybe you are loading a layout?
Hi Felix,
I don't think this is possible. A double-click includes two clicks. So the control has no way of knowing that the first click is eventually going to be a double-click.
I want to disable colum sorting when double click only. but I need sorting when single click event.
could it solve? How can it possible? please help me.
Thanks for your helps.
Thanks and Regards
Felix G.
Glad you found it.
I meant using the Load method on the grid's DisplayLayout.
I found it! You were right Mike, the properties were re-set in code.
Thank you guys, dahrlin :-)
Right Mike, something is wrong. I need to check whether this property is re-set somewhere.
Sorry for my ignorance, but what do you mean with "loading a layout"?