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

TreeList MVVM Bindings - Refresh/Paint SINGLE Row

7 Answers 41 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 11 Feb 2017, 06:27 PM

Using the MVVM bindings (using data-bind), doing a set() on any data item will cause the ENTIRE TreeList to recalculate everything.  Even with just a couple hundred rows this causes the browser to stop responding and with a few thousand rows the browser can crash.

 

Is there any possible way to refresh or repaint a SINGLE row of the TreeList similar to the refresh() method of the TreeList, but for a single row instead of everything?

7 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Feb 2017, 01:22 PM
Hello Douglas,

Currently, re-rendering only a single row of the TreeList is not supported.

Still, the TreeList widget is using a specific virtual DOM, which will check the differences in the old and the new state and re-render smaller part of the DOM, not the whole widget tree.

This can be observed in the following example, the refresh button will refresh the TreeList with 2000 items almost instantly:

http://dojo.telerik.com/eNEdo/2

Regards,
Stefan
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.
0
Doug
Top achievements
Rank 1
answered on 14 Feb 2017, 04:20 PM
Thanks, I may still have some .set()'s in my code somewhere.
0
Doug
Top achievements
Rank 1
answered on 24 Feb 2017, 09:12 PM

I've done all I can as far optimizing my code.  Here are some timings:

 

Calculate 0.3ms  (all my code)

Refresh 2728.7ms (treeList.refresh())

 

There are less than 600 rows in the TreeList.  If I could refresh any single row the performance would be blistering fast.  Or if data-bind wasn't so abysmally slow....

 

0
Doug
Top achievements
Rank 1
answered on 24 Feb 2017, 09:23 PM
Your example doesn't make any changes to the data and it is not using templates that use data-bind.  You are comparing apples to oranges here.  I know MVVM is the red-headed step-child of the Kendo feature set, but it is still supported.
0
Doug
Top achievements
Rank 1
answered on 27 Feb 2017, 09:14 PM
Would the refresh method be faster if the TreeList were given a set height and marked scrollable?
0
Doug
Top achievements
Rank 1
answered on 27 Feb 2017, 09:17 PM
Would the refresh be faster if the TreeList has a set height and is marked scrollable?
0
Vasil
Telerik team
answered on 28 Feb 2017, 03:52 PM
Hello Douglas,

The height and the scroll are not affecting the rendering speed. You could test it in your application as well.

I would be glad to profile your application and tell you if you can speed it somehow by adjusting the configuration, but you will need to give use an runnable example.

Regards,
Vasil
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.
Tags
TreeList
Asked by
Doug
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Doug
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or