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

Angular k-rebind grid column resize causes refresh

3 Answers 1259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 2
Gabriel asked on 02 Jul 2016, 08:40 AM

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?

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 05 Jul 2016, 11:25 AM
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.
0
Gabriel
Top achievements
Rank 2
answered on 06 Jul 2016, 11:45 AM

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.

0
Dimiter Topalov
Telerik team
answered on 08 Jul 2016, 07:11 AM
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.
Tags
Grid
Asked by
Gabriel
Top achievements
Rank 2
Answers by
Dimiter Topalov
Telerik team
Gabriel
Top achievements
Rank 2
Share this question
or