Page 1 of 1

Dynamic Captions for ContextMenu Items

PostPosted: 08 Oct 2018 14:07
by MicroSolutions
Hi,

Is there any way to dynamically change the Captions of the ContextMenu Items, before PopUp?
(use build callback?)


Thanks in advance!
MicroSolutions

Re: Dynamic Captions for ContextMenu Items

PostPosted: 08 Oct 2018 17:33
by Alexander Bulei
Hi MicroSolutions,

Please check the attached demo.

Best Regards.

Re: Dynamic Captions for ContextMenu Items

PostPosted: 08 Oct 2018 18:55
by MicroSolutions
Thank You!

Would this be also possible on the Server side Ajax script (OnEvent)?

Additionally if I set all items to invisible (Visible:=False) the empty list PopsUp.
Is there any way to prevent it?

Best Regards:
MicroSolutoins

Re: Dynamic Captions for ContextMenu Items

PostPosted: 09 Oct 2018 09:05
by Alexander Bulei
Hi MicroSolutions,

Would this be also possible on the Server side Ajax script (OnEvent)?


What do you mean?

Additionally if I set all items to invisible (Visible:=False) the empty list PopsUp.
Is there any way to prevent it?


Just return false OnShow event:

javascript code
return false;


Best Regards.

Re: Dynamic Captions for ContextMenu Items

PostPosted: 09 Oct 2018 13:10
by MicroSolutions
Hi,

I need this logic on the Delphi (JQContextMenuOptions.Events.Show.OnEvent ) part if possible:
Change contextmenu item caption, and show/hide items.

Best Regards:
MicroSolutions

Re: Dynamic Captions for ContextMenu Items

PostPosted: 09 Oct 2018 14:16
by Alexander Bulei
Hi MicroSolutions,
There is no way to do that on server side.

Best Regards.