This is a migrated thread and some comments may be shown as answers.

Filter is very slow - kendo tree view

3 Answers 237 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Barani
Top achievements
Rank 1
Barani asked on 18 Dec 2012, 06:38 PM
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

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 21 Dec 2012, 07:56 AM
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!
0
GSS
Top achievements
Rank 1
answered on 31 Oct 2014, 01:08 AM
1966 nodes for the TreeView is crash in ie8,
http://jsbin.com/tociq/2/

0
Petur Subev
Telerik team
answered on 31 Oct 2014, 03:35 PM
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!
 
Tags
TreeView
Asked by
Barani
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
GSS
Top achievements
Rank 1
Share this question
or