Nevron Forum

NDataGridView column context menu

https://www.nevron.com/Forum/Topic5945.aspx

By Brad Swearingen - Monday, December 12, 2011

I noticed the Nevron NDataGridView widget shows a context menu when right clicking the grid column header.  This menu has "Sort Ascending", "Sort Descending" and other menu items on it.

My NDataGridView requires I set VirtualMode to true and provide my own custom sorting.  When doing this the sort menu items remain yet they do nothing when the user selects them.  How can I remove these menu items from this context menu or hook into the event when the user selects them?

I'm on the 11.1.17.12 build.

By Nevron Support - Monday, December 12, 2011

Hi Brad,

You can only disallow the whole context menu to be displayed by setting UseColumnContextMenu to false.
You can't change commands from this context menu.
By Brad Swearingen - Monday, December 12, 2011

Thanks very much for the tip.  Works great.