TreeList MVVM Bindings - Refresh/Paint SINGLE Row

8 posts, 0 answers
  1. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 11 Feb 2017 Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    2893 posts

    Posted 14 Feb 2017 Link to this post

    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.
  3. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 14 Feb 2017 in reply to Stefan Link to this post

    Thanks, I may still have some .set()'s in my code somewhere.
  4. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 24 Feb 2017 Link to this post

    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....

     

  5. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 24 Feb 2017 in reply to Stefan Link to this post

    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.
  6. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 27 Feb 2017 in reply to Stefan Link to this post

    Would the refresh method be faster if the TreeList were given a set height and marked scrollable?
  7. Douglas
    Douglas avatar
    6 posts
    Member since:
    Jan 2016

    Posted 27 Feb 2017 in reply to Stefan Link to this post

    Would the refresh be faster if the TreeList has a set height and is marked scrollable?
  8. Vasil
    Admin
    Vasil avatar
    1641 posts

    Posted 28 Feb 2017 Link to this post

    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.
Back to Top