This is a migrated thread and some comments may be shown as answers.

Supported Properties for Menu

5 Answers 29 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 27 Aug 2015, 04:57 PM

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

Sort by
0
Petyo
Telerik team
answered on 31 Aug 2015, 08:55 AM

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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Henrik
Top achievements
Rank 1
answered on 16 Dec 2016, 09:56 AM
Any update on this? Has it been implemented/rejected or is it scheduled as part of a release?
0
Dimiter Madjarov
Telerik team
answered on 20 Dec 2016, 08:56 AM

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.

Regards,
Dimiter Madjarov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Henrik
Top achievements
Rank 1
answered on 20 Dec 2016, 09:16 AM

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.

0
Dimiter Madjarov
Telerik team
answered on 20 Dec 2016, 09:54 AM

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.

Regards,
Dimiter Madjarov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Menu
Asked by
Randy
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Henrik
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or