Filter is very slow - kendo tree view

4 posts, 0 answers
  1. Barani
    Barani avatar
    9 posts
    Member since:
    Dec 2012

    Posted 18 Dec 2012 Link to this post

    Hi,

    I am forming the JSON object as below manually, pushing it to an array and provide it as datasource to kendo tree view.

    Everything seems to work fine except for filter functionality..
    Filtering seems to happen very slow when there are more entries in the tree hence I assigned
    the below array to hierarchical data source and assigned the hierarchical datasource as source for
    tree view. This solved the filtering issue but whenever I click any particular node it takes sometime
    to view its child nodes. Is there a way to avoid this delay in loading child nodes when using
    hierarchical data source?

    contextpath= { text: "TreeRoot", items: [ { text: "subgroup1" , items: [ { text: "subgroup2", items: [ { text: "subgroup3" }] }] }] }] };

    contextpath1= {
            text: "TreeRoot",
            items: [ {
                text: "subgroup1" ,
                items: [ {
                    text: "subgroup2",
                    items: [ {
                        text: "subgroup3"
                        }]
                    }]
                }]
            }]
        };

    array1.push(contextpath)
    array1.push(contextpath1).

       var localDataSource = new kendo.data.HierarchicalDataSource({
            data:array1
        });
      

        var groupTree1 = $("#"+elementId).kendoTreeView({
            dataSource: localDataSource
        }).data("kendoTreeView");

    Thanks,
    Barani
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 21 Dec 2012 Link to this post

    Hello Barani,

    How many nodes do you use for the TreeView? Could you share a JSBIN example so we can take a look?

    http://jsbin.com/edamuj/175/edit

    Kind Regards,
    Petur Subev
    the Telerik team
    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. GSS
    GSS avatar
    1 posts
    Member since:
    Oct 2013

    Posted 30 Oct 2014 in reply to Petur Subev Link to this post

    1966 nodes for the TreeView is crash in ie8,
    http://jsbin.com/tociq/2/

  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 31 Oct 2014 Link to this post

    Hello Barandi,

    2000 items are much, and you are also causing much overhead by expanding all the items in such way where multiple items are re-expanded for no reason. You can make a node expanded initially by settings the expanded field of a node to true.

    e.g.

    http://jsbin.com/cegakazehu/1/edit

    Regards,
    Petur Subev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready