Remote data and Expand all nodes (without lazy loading)

2 posts, 0 answers
  1. Ludovic
    Ludovic avatar
    2 posts
    Member since:
    Jan 2014

    Posted 28 Aug 2014 Link to this post


    I didn't manage to expand all nodes with the treeview remote data.

    Is it possible ?

    Many Thanks !
    01.  @(Html.Kendo().TreeView()
    02.       .Name("treeview2")
    03.         .Checkboxes(checkboxes => checkboxes
    04.              .Name("checkedFiles")
                05.         .CheckChildren(true)
    06.           )
    07.            .LoadOnDemand(false)
    08.            .ExpandAll(true)
    09.            .DataTextField("Name")
    10.       .DataSource(dataSource => dataSource.Read(read => read.Action("GetAssemblies", "FrontDataSource"))))

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 29 Aug 2014 Link to this post

    Hello Ludovic,

    You can use the dataBound event of the widget in order to make sure that the data is loaded when you try to expand the nodes. Here is an example that I created:

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top