Menu datasource: how to access it and add custom properties?

2 posts, 0 answers
  1. Henrik
    Henrik avatar
    13 posts
    Member since:
    Oct 2016

    Posted 20 Apr 2017 Link to this post


    I'm using the Kendo UI Menu for Angular 1 to list projects users can access in a solution. Is it possible to use JSON objects received from a WebAPI directly as menuItems or will I have to remap these into simpler objects? In this demo you are using custom attributes, will I be able to access these in the select event (how?)?

    Further more, is it possible to access the datasource from another function in my Angular controller? I am currently storing the project ID in localstorage and if I'm able to use JSON objects or custom attributes in MenuItems I'd like to access the datasource so I can retrieve properties/attributes from the MenuItems.



  2. Dimitar
    Dimitar avatar
    815 posts

    Posted 24 Apr 2017 Link to this post

    Hello Henrik,

    Kendo UI Menu does not support binding to a remote DataSource. You can initialize it from HTML markup or from JSON data objects. For more information you can check this documentation example, which shows how to use JSON DataSource and how to assign select handler for every item.

    On the following Dojo example you will find a simple implementation of the Kendo Menu in AngularJS. I have added a button, which logs in the console the DataSource items from the menu.

    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