Kendo Menu and Hyperlinks

2 posts, 0 answers
  1. Martin
    Martin avatar
    15 posts
    Member since:
    Sep 2013

    Posted 30 Oct 2014 Link to this post

    OK it seems to me that this should be a simple thing but for some reason it is not documented anywhere (at least I can't find it).

    I have a working menu EXCEPT hyper links

    Sure I can get it to fire the select event. What exact is being passed in. I can't get the values I set on the "item" object (Text or Url).

    What are the available properties for the "item" object in the above example?

    All I need to do is make the select function redirect to a new page. I would think that this is what 99% of your users would want to do. Why is an end-to-end example of a hierarchical model with hyperlinks not given?

    Please provide this.

    .Name("adminMenu") //The name of the menu is mandatory. It specifies the "id" attribute of the widget.
    .BindTo(Model, mappings =>
    mappings.For<McGladrey.DOTT.DataModel.DOTTCustom.sp_GetUserTreeData_Result>(binding => binding //define first level of menu
    .ItemDataBound((item, parent) => //define mapping between menu item properties and the model properties
    item.Text = parent.NodeName;
    .Children(parent => parent.ChildrenNodes)
    ); //define which property of the model contains the children
    mappings.For<McGladrey.DOTT.DataModel.DOTTCustom.sp_GetUserTreeData_Result>(binding => binding
    .ItemDataBound((item, child) =>
    item.Text = child.NodeName;
    item.Url = child.NodeAction;


    <script type="text/javascript">

    function MenuSelected(e)
    alert(e.item.Text + " " + e.item.Url);


  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 03 Nov 2014 Link to this post

    Hello Martin,

    I assume you are struggling because the intellisense is not working, since there are two similar overload which for some reason cannot be resolved to give suggestions at the moment of typing. You can however specify the type of the parameters for the lambda function and you will start getting intelli-sense suggestions.


    @model IEnumerable<Kendo.Mvc.Examples.Models.Category>
          .BindTo(Model, mappings =>
                mappings.For<Kendo.Mvc.Examples.Models.Category>(binding => binding
                        .ItemDataBound((MenuItem item, Kendo.Mvc.Examples.Models.Category category) =>
                            item.Text = category.CategoryName;
                            item.Url = ...
                        .Children(category => category.Products));
                mappings.For<Kendo.Mvc.Examples.Models.Product>(binding => binding
                        .ItemDataBound((item, product) =>
                            item.Text = product.ProductName;

    I guess the option you look for is the item.Url.

    I hope this helps.

    Petur Subev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. UI for ASP.NET AJAX banner
Back to Top