Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
Context menus and the grid control
posted

What are my options for opening up a context menu for your grid control.

I found that I could either add a paticular context menu to the grid control or open up a context menu on the mouse down event

The problem with adding the context menu to the control is that I don't know how to then offer difrent menu options depending on which cells was clicked.

I can do this with the mouse down event route but I then have a strange quirk that is annoying me where if you miss the cell you clicked on you can't just right click again (like you can normally) since the gridcontrol no longer has focus the context menu does, so u have to click to clear the menu then click a third time to bring up the menu for the second time.

Small I know but its annoying me.

Are there any better ways of doing this?

 

Cheers,

Dave

Parents
  • 225
    posted

    This is using your Context Menu Ultra of course

    I suppose all I really need is an event on the ultra grid control that fires before poping up the context menu that gives me a mouse pos (to get a UI element from) and access to the menu it it just about to display (so I can hide tools).

    I like the idea of all the toolbars and menus using the same tools / icons and all the code is in the same place.

Reply Children