Search code examples
kendo-uidatasourcebindkendo-menu

How to bind kendo-menu to remote datasource?


below is my code

$("#lhsPanelBar").kendoMenu({
    orientation: 'vertical',
    dataSource:
        {
            type: 'json',
            transport:  {
                    read: "http://localhost:3549/api/LHSMenu"
                }
        },
});

but there is not server hit on controller and menu is displayed as "undefined".

Controller code

public class LHSMenuController : ApiController
{
    private IRepo repo;
    public LHSMenuController()
    {
        repo = new Repository();
    }

    [HttpGet]
    public IEnumerable<LHSMenu> GetLHSMenu()
    {
        return this.repo.Menu;
    }
}

Solution

  • The Kendo UI Menu doesn't support binding to a remote data source for the time being.