Angular k-rebind grid column resize causes refresh

4 posts, 0 answers
  1. Gabriel
    Gabriel avatar
    3 posts
    Member since:
    Aug 2015

    Posted 02 Jul Link to this post

    Using the k-rebind option on the Kendo grid causes it to refresh every time a user resizes a column.

    This issue has been posted in the past http://www.telerik.com/forums/grid-angular-k-rebind-issue-since-q3-update and the solution was to bind to the data source which will not work in my situation as all of the options can possibly change.

    Is it possible to stop it from refreshing when the user resizes a column?

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    349 posts

    Posted 05 Jul Link to this post

    Hi Gabriel,

    I could not reproduce the described behavior. I have prepared a simple dojo, but the Grid is not recreated when the user resizes a column using the resizing handlers:

    http://dojo.telerik.com/aNiDE

    Can you please modify it using your settings to replicate the issue, or send us a similar isolated runnable example, so we can examine it further, and determine what is causing the undesired behavior.

    Please note that, depending on the scenario, it can turn out that there is nothing we can do. The k-rebind attribute destroys the original widget, and recreates it using the changed options:

    http://docs.telerik.com/kendo-ui/AngularJS/introduction#widget-update-upon-option-changes

    The Kendo UI widgets using k-rebind are dependent on the change event, fired by AngularJS, and the actual behavior in different scenarios is beyond our control.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
  3. Kendo UI is VS 2017 Ready
  4. Gabriel
    Gabriel avatar
    3 posts
    Member since:
    Aug 2015

    Posted 06 Jul Link to this post

    Hi Dimiter,

    Thanks for your reply.

    It is strange that your example works even after applying my settings to it. Observing the scopes with Google Chrome AngularJS Batarang extension shows that both of them update the width property on resizing but only mine rebinds because of the change. 

    The only difference between my application and your example with my settings is my application has a lot more components with various nested scopes so it could be an issue with AngularJS not Kendo. 

     

    Regards,

    Gabriel.

  5. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    349 posts

    Posted 08 Jul Link to this post

    Hi Gabriel,

    What k-rebind does is that it uses the AngularJS $watch function to update the scope field (in the discussed scenario - the Grid's options). The behavior from this point on is dependent on raising the Angular change event, that is beyond our control.

    You can check out whether something in your more complicated nested scopes scenario is causing changes to any of the options by reference, that in turn trigger k-rebind, and the undesired behavior.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top
Kendo UI is VS 2017 Ready