By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,289 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,289 IT Pros & Developers. It's quick & easy.

Changing ContextMenu

P: n/a
Hello,
I have several ContextMenus and I want to connect them to the GridControl's
ContextMenu property depending on the row that was right clicked. Is there
an event that is raised just before the ContextMenu is displayed? (In Delphi
we used to have the ContextPopup event and we could change the ContextMenu
there.)
What is the best way to achieve this?

Libby
Apr 25 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is where
you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
Hello,
I have several ContextMenus and I want to connect them to the
GridControl's
ContextMenu property depending on the row that was right clicked. Is there
an event that is raised just before the ContextMenu is displayed? (In
Delphi
we used to have the ContextPopup event and we could change the ContextMenu
there.)
What is the best way to achieve this?

Libby

Apr 25 '06 #2

P: n/a
Thanks... But what if, as I said, I'm using several ContextMenus and
switching betwwen them? Do I have to populate each one of them with the same
event handler for popup? Wouldn't it be much less cumbersome if only the
component they are attached to raise the event?
Does anyone know if there is such event that the component raise?

"Michael Sander" <sp**@h3c.de> wrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is where you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
Hello,
I have several ContextMenus and I want to connect them to the
GridControl's
ContextMenu property depending on the row that was right clicked. Is there an event that is raised just before the ContextMenu is displayed? (In
Delphi
we used to have the ContextPopup event and we could change the ContextMenu there.)
What is the best way to achieve this?

Libby


Apr 25 '06 #3

P: n/a
Guess then you will need to use the mousedown-event...

Or create one single, empty contextmenu. on every popup you clear it and
merge it with the correct contextmenu.

But usual practice is (at least for me) to put alle the items in one
contextmenu and disable or hide the ones not needed on popup.
"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:On**************@TK2MSFTNGP05.phx.gbl...
Thanks... But what if, as I said, I'm using several ContextMenus and
switching betwwen them? Do I have to populate each one of them with the
same
event handler for popup? Wouldn't it be much less cumbersome if only the
component they are attached to raise the event?
Does anyone know if there is such event that the component raise?

"Michael Sander" <sp**@h3c.de> wrote in message
news:e%****************@TK2MSFTNGP03.phx.gbl...
Hi,
just like in Delphi the ContextMenu has an event called Popup. This is

where
you want to put your code.

Michael

"Libby Sharf" <li*********@il.quest.com> schrieb im Newsbeitrag
news:OS**************@TK2MSFTNGP05.phx.gbl...
> Hello,
> I have several ContextMenus and I want to connect them to the
> GridControl's
> ContextMenu property depending on the row that was right clicked. Is there > an event that is raised just before the ContextMenu is displayed? (In
> Delphi
> we used to have the ContextPopup event and we could change the ContextMenu > there.)
> What is the best way to achieve this?
>
> Libby
>
>



Apr 25 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.