I want a context menu for a GridDataBoundGrid(NOT A GridListControl) which is emulating a listbox.
I have no problem displaying this for a single mode, by overriding the mousedown event.
However for multiple selection it gets kinda clumsy because :
if you right click on item 4 you dont want it to deselect all the other selected rows and highlight that row UNLESS item 4 isnt part of the existing collection of selected rows, in which case you do.
Is there any built in functionality for context menus i''m overlooking, or do i need to do the brunt work?
ADAdministrator Syncfusion Team January 16, 2004 03:17 PM
You can avoid the right-click from deselecting cells (all the time) by setting this property:
this.gridControl1.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left
If you want a fixed context menu, you can set the Context property on the GridDataBoundGrid. If you the Context menu to vary cell to cell, then you do have to do more work. Here is a KB link.
There are other ways to do this if this does not serve your needs.