How to filter treeview which is loaded lazily and with remote data

4 posts, 0 answers
  1. Naga
    Naga avatar
    25 posts
    Member since:
    Jul 2015

    Posted 04 May 2017 Link to this post

    Hi 

    I have a treeview with remote binding like this

    http://demos.telerik.com/kendo-ui/treeview/remote-data-binding

    how to filter data when data is bound remotely? 

    in this example i want to give "Robert King" as input and want to open all nodes until "Robert King"

     

    2. ) If i provide input "Laura Callahan" is there a way i can stop opening "Steven Buchanan" node ? 

    i am getting haschildren value from my database, if hasChildren is false i should not open that node

    Please help with above two tasks.

     

    Thanks

  2. Plamen
    Admin
    Plamen avatar
    3056 posts

    Posted 08 May 2017 Link to this post

    Hello,

    You can filter the nodes that are already loaded as for example it is done in the code in this dojo page. The nodes that are not loaded yet are not considered for the loading. If you want to consider them too you will have to implement custom filtering on the server side and recreate the widget after each serve request so that all the parent -child relationships are correct.

    That is why in such filtering case we would rather recommend setting loadOnDemand to false.

    Regards,
    Plamen
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Boris
    Boris avatar
    16 posts
    Member since:
    Mar 2015

    Posted 28 May 2019 Link to this post

    I have a similar constellation. A remote data source with loadOnDemand set to true hooked up to a checkboxed dropDownTree. I want the user to be able to use the widgets search function and set the filter setting to "contains", but only the already loaded elements will be used in the search. Is there a way to load all the remaining elements as soon as the user enters something in the widgets searchbox?

    Thanks in advance
  4. Plamen
    Admin
    Plamen avatar
    3056 posts

    Posted 30 May 2019 Link to this post

    Hi,

    There is no built in way to load all the nodes. One possible option is to use the dataBound event and loop through the loaded items and trigger reed on the items that have children yet in such cases we would rather recommend using loadOnDemand false.

    Regards,
    Plamen
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top