I have been looking at the example for creating a menu from a JSON object and haven't found a list of supported properties.
http://docs.telerik.com/KENDO-UI/web/menu/overview#initialize-the-menu-using-json-data-object
They list several in the example, but is that a complete list? On the URL for example is there a way of having it open in a new window (target="_blank") vs. a redirect?
I would also like to be able to assign a javascript function to a click even, and have seen on click used in different examples, but is it supported for JSON.
Overall I have found a lot of examples and information of item manipulation, but very little on getting it to do what you want when you click it. I don't really want to have a nightmare of a switch statement in the on select event.
Thanks
Randy
5 Answers, 1 is accepted
Hello Randy,
a complete list of the properties supported by the dataSource object is listed in the menu API reference. I am afraid, however, that they don't include per-item click callbacks. This is an useful concept, which will avoid the long switch/case code in a common callback. We have it in the newer toolbar widget, for example. I will log this for future consideration on our side.
Regards,Petyo
Telerik
Hello Henrik,
Could you elaborate what are you looking to implement, so we could provide assistance regarding it?
I am looking forward to hearing from you.
Dimiter Madjarov
Telerik by Progress
Hi Dimiter,
I'm trying to add items to a Kendo UI Menu and I need the "Click" event on Menu Items so I can call functions in my Angular controllerfor logging out, changing language, redirecting to other sites etc. As of now I have to set the datasource to a raw HTML string in order to use the click event in Angular. While this works now, it's impossible to add items dynamically AND get the click event to work.
Hello Henrik,
Here is a small example that demonstrates the approach in action. I am appending new items to the menu dynamically and the select event handler is triggered for them.
I hope it will help you to implement the scenario on your end.
Dimiter Madjarov
Telerik by Progress