Supported Properties for Menu

6 posts, 0 answers
  1. Randy
    Randy avatar
    72 posts
    Member since:
    Jan 2009

    Posted 27 Aug 2015 Link to this post

    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

     

  2. Petyo
    Admin
    Petyo avatar
    2442 posts

    Posted 31 Aug 2015 Link to this post

    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!
     
  3. Henrik
    Henrik avatar
    5 posts
    Member since:
    Oct 2016

    Posted 16 Dec 2016 Link to this post

    Any update on this? Has it been implemented/rejected or is it scheduled as part of a release?
  4. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2207 posts

    Posted 20 Dec 2016 Link to this post

    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.
  5. Henrik
    Henrik avatar
    5 posts
    Member since:
    Oct 2016

    Posted 20 Dec 2016 Link to this post

    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.

  6. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2207 posts

    Posted 20 Dec 2016 Link to this post

    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.
Back to Top