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.
Hmmm... I tried the above proposal to disable column sorting.
The sorting is indeed disabled, but when clicking a column header, the entire column is marked. I'd like to disable the sorting and avoid marked columns. Is there away to achieve this.
Kind regards, darhlin
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 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.
Hi,
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"?