Hello,
I've been trying to keep a menu open after a selection of an item (the menu has checkbox stuff and I need to allow the user to select the items before close it).
So far I only can get that behavior creating a fake function and generating a javascript error:
And this is the way I try to do it in js:
The user need to select the items in the menu and then apply the changes when select "Apply", the only way I could keep the menu open until the user select apply is using a simple javascript error.
Is any better way to do what I want? just to keep the menu displayed until the user select the correct menu option?
Thanks a lot for your help!
I've been trying to keep a menu open after a selection of an item (the menu has checkbox stuff and I need to allow the user to select the items before close it).
So far I only can get that behavior creating a fake function and generating a javascript error:
| <telerik:RadContextMenu ID="contextColumns" runat="server" Flow="Vertical" Skin="Hay" OnClientItemClicked="OnMenuClick"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| <Items> |
| <telerik:RadMenuItem runat="server" Text="Show Columns" Value="Columns"> |
| <Items> |
| <telerik:RadMenuItem runat="server" Text="Id" State="checked" /> |
| <telerik:RadMenuItem runat="server" Text="First Name" State="checked" /> |
| <telerik:RadMenuItem runat="server" Text="Last Name" State="checked" /> |
| <telerik:RadMenuItem runat="server" IsSeparator="true" /> |
| <telerik:RadMenuItem runat="server" Text="Apply" Value="menuApply" /> |
| </Items> |
| </telerik:RadMenuItem> |
| </telerik:RadMenuItem> |
| </Items> |
| </telerik:RadContextMenu> |
And this is the way I try to do it in js:
| function OnMenuClicked(sender, args) { |
| var item = args.get_item(); |
| switch(item.get_value()) { |
| case "menuApply" : |
| // Here I need to apply changes and that's all |
| break; |
| default : |
| ToggleCheckImage(item); |
| this_function_does_not_exists(); // the only way to keep the menu open |
| } |
| } |
The user need to select the items in the menu and then apply the changes when select "Apply", the only way I could keep the menu open until the user select apply is using a simple javascript error.
Is any better way to do what I want? just to keep the menu displayed until the user select the correct menu option?
Thanks a lot for your help!