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

treeview expandpath doesn't always call the complete function

2 Answers 108 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Bart
Top achievements
Rank 1
Bart asked on 26 Feb 2016, 09:37 AM

Hi,
I'm making use of the expandPath function of the treeview, but is doesn't always call the complete function the first time, as if it doesn't do this if it takes to long or something. It works perfectly if I call the function twice but that shouldn't be the solution.

treeView.expandPath(arrPath);
               treeView.expandPath(arrPath, function() {
                   var getitem = treeView.dataSource.get(path);
                   var selectitem = treeView.findByUid(getitem.uid);
                   treeView.select(selectitem);
                   treeView.trigger('select', { node: selectitem });
               });

Am I missing something here what I should do different?

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 29 Feb 2016, 12:38 PM

Hello Bart,

Can you please provide a Dojo snippet that reproduces this problem?

Regards,
Alex Gyoshev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Devin
Top achievements
Rank 1
answered on 20 Jul 2016, 09:11 PM
I also have this problem. I'm calling expandPath in an ajax call where I end up calling it multiple times to expand multiple paths. Sometimes the complete function calls for some of the paths, sometimes not, and trying to get treeView.dataSource.get(id) fails sometimes inside the complete function even though it's not supposed to fire until the path has been expanded (and the id should be available). I am submitting a ticket since there is no solution here.
Tags
TreeView
Asked by
Bart
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Devin
Top achievements
Rank 1
Share this question
or