Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Menu > Binding Object to Rad Menu

Not answered Binding Object to Rad Menu

Feed from this thread
  • Pasquale avatar

    Posted on Mar 7, 2012 (permalink)

    Hello Everybody,

    I would like to know if it's possible to bind this type of object to the rad menu:

    class Parent {
      string name
      int id
      List<child>
    }

    class child {
      string name
      int id
    }

    I tried many times without any luck.
    Thanks.

    Reply

  • Posted on Mar 8, 2012 (permalink)

    Hello Pasquale,

    The RadMenu cannot bind to an object like that because it will not iterate through your List<child> object. The only structure that it would be able to bind to, with regards to a class, would have to look something like this:

    class Item
    {
        string name;
        int id;
        int? parentId;
    }

    Here the parent and child objects are the same class, the only difference being that the child has a value set in it's parentId field, where the parent would have this set as null (this is how it determines what are root elements).

    I hope that explains how the RadMenu binding works.

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Menu > Binding Object to Rad Menu
Related resources for "Binding Object to Rad Menu"

[  ASP.NET Menu Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]