TreeList with loadOnDemand of remote HierarchicalDataSource

7 posts, 0 answers
  1. Itay
    Itay avatar
    16 posts
    Member since:
    Nov 2015

    Posted 10 Dec 2015 Link to this post

    I am trying to load remote HierarchicalDataSource to Kendo-UI TreeList with loadOnDemand. I see that the data function is called with the response that consists the first element . But the data is not displayed in the TreeList, instead the message 'No records to display' appears.

    Also have notice that the function hasChildren is not called. (BTW: this code works with TreeView)

     

    Please advice. 

     

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 14 Dec 2015 Link to this post

    Hello Itay,

     

    The TreeList widget can only be bound with TreeListDataSource. The following example demonstrates load on demand - TreeList / Binding to remote data

     

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Itay
    Itay avatar
    16 posts
    Member since:
    Nov 2015

    Posted 14 Dec 2015 in reply to Nikolay Rusev Link to this post

    Thanks Nikolay.

     

    Is it possible to make TreeList load on demand?

  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 16 Dec 2015 Link to this post

    Hello Itay,

     

    The example linked in my previous post is demonstrating load-on-demand binding.

     

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Greg
    Greg avatar
    2 posts
    Member since:
    Feb 2011

    Posted 19 Jul in reply to Nikolay Rusev Link to this post

    I'm trying to achieve the same thing (TreeList load on demand) - however, the example referenced doesn't illustrate this capability. What am I missing?
  7. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    347 posts

    Posted 21 Jul Link to this post

    Hello Greg,

    I will post the answers from ticket ID 1051689 here, so others can benefit as well:

    The default behavior of the Kendo UI TreeList is to send a request for the child items only when a parent row is expanded. You can confirm this by exploring the Network tab in the browser's developers tools (F12) for the mentioned demo, or in the following dojo, based on the same example:

    http://dojo.telerik.com/IjepA

    The length of the dataSource's data is 1 in the beginning, and increases after expanding different items.
    The implementation of the remote service, used by our online demos can be found in the following GitHub repository:

    https://github.com/telerik/kendo-ui-demos-service

    The controller, used in the discussed demo, can be found here:

    https://github.com/telerik/kendo-ui-demos-service/blob/master/KendoCRUDService/Controllers/EmployeeDirectoryController.cs

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  8. Greg
    Greg avatar
    2 posts
    Member since:
    Feb 2011

    Posted 21 Jul in reply to Dimiter Topalov Link to this post

    Thanks Dimiter.
Back to Top
Kendo UI is VS 2017 Ready