In this Kendo UI menu sample, if you click on "Stores" you will see a template-based menu. It has a button "See full list" but it doesn't do anything.
Question: how to trigger an action when an element is clicked in a template-based menu? Note that the menu should close after the action is triggered.
You can close the menu on Button cilck as below:
<button onClick="alert('See Full Clicked.'); $('#menu').data('kendoMenu').close();" class="k-button">See full list</button>
See the updated Menu example:
Updated Kendo Menu sample
Related
I am unable to get a dropdown menu to work in the api management developer portal. There is very little documentation about this, but I have seen from github questions that it is suppose to be able to have a dropdown menu in the top menu bar like in this link
I am unable to get this myself. I have created pages in the navigation menu that have subpages,
and I tried to add a menu widget to the top bar with the root navigation item beeing the menu with subpages, but there is no options when editing the menu to select the list to be dropdown.
How can I get dropdown menues?
There are no "Submenu" or "Menu with Dropdown" widgets, the only other dropdown widgets I find is "List of APIs (dropdown)" and "List of products (dropdown)".
In the navigation structure you can create sub-menus by selecting a parent item and then clicking "Add navigation item" to add child items (also you can use arrow keys to make an existing item a subpage or promote it to parent level). After that, the Menu widget with "Horizontal" layout will display the dropdown when clicking on them. Menus with "Vertical" layout will form a tree of navigation items.
I am using MVC Kendo Grid. First column has an icon which opens a right click context menu. I want to left click this icon and open a context menu / menu.
Please note on individual row I want to perform some operation when selecting some operation.
You can specify the event to show the context menu: .ShowOn("click"). See https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/ContextMenuBuilder#showonsystemstring for documentation and https://docs.telerik.com/kendo-ui/api/javascript/ui/contextmenu/configuration/showon for an example.
I'm using the bootstrap 3 navbar with drop down. Default is behaviour is on click open dropdown and on second click close. I want to visit the link on second click. Is that posible whith default bootstap functionality>
Try this:
$('.dropdown').on('show.bs.dropdown', function () {
$(this).siblings('.open').removeClass('open').find('a.dropdown-toggle').attr('data-toggle', 'dropdown');
$(this).find('a.dropdown-toggle').removeAttr('data-toggle');
});
This will toggle the dropdown open on the first click, while closing any other open dropdowns. If you click the parent of the open dropdown menu again it will navigate to it's href. If you toggle a different dropdown it will "reset" any dropdowns that were open so that you can re-toggle them again.
I have my menu set to:
.CloseOnClick(true)
.OpenOnClick(true)
(I am using MVC4 with Razor syntax)
When I click on a menu item, it opens the menu content, but when I click on the menu item again, the screen jumps down the page when it's not supposed to. I can't figure out why the screen is jumping.
Here is the code in question that is triggered:
items.Add().Text("Stores")
.Content(#<text>
<h2>Around the Globe</h2>
</text>);
It seems the screen is jumping because of the .Content() parameter.
Also, before the menu is clicked, the URL is:
http://localhost:55656/HelloWorld
But after it is pressed the URL changes to:
http://localhost:55656/HelloWorld#Menu-2
Although nothing changes besides the Kendo UI Menu opening up, it's not until it's pressed again that the screen jumps.
Seems like the Menu is navigating on click. This should only happen if you intend the item to navigate () or if you have a JavaScript error on the page and the click on the item is not prevented. Can you check if there really is an error and post it here?
Ok I cannot freaking can't believe this. I cannot find a dropdown menu in Sketchflow - Expression Blend 4. I need to create a mockup quicky and easy and it's amazing how I cannot find a simple dropdown to drag to my project's web page mock-up I am creating here.
In WPF/SL the dropdown is called ComboBox
You can search for the sketch controls and select the ComboBox from the Assets window, or you can select it from right clicking on the Buttons icon on the toolbar: