We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Context menu and ListBoxSelectionMode=MultiExtended

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?

1 Reply

AD Administrator 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. http://www.syncfusion.com/Support/article.aspx?id=10054 There are other ways to do this if this does not serve your needs.

Loader.
Live Chat Icon For mobile
Up arrow icon