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

BestFitColumns strange behavior

3 Answers 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 04 Dec 2018, 02:10 PM

Hello,

I have two RadGridView bound to two different Lists, on two different tabs of a tab control; I DeferRefresh, set the data source, set AutoSize columns mode to none and then call BestFitColumns

The second grid, containing just two example rows, gets its columns resized as expected, but not the first that looks like nothing happened.

The strange behavior is that, if I manually resize (aka click the corner of the window and drag) even just of some pixels the WinForm where the tabs and the grids are staying, the columns gets refreshed to the best fit, as expected from the BestFitColumns command, somehow like it was not refreshed after the bind. This grid have 60 rows, not so many, both Lists contains the same class, so the amount of columns is the same; both grids have the same attributes.

Any idea?

Thank you in advance

Best regards

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 05 Dec 2018, 07:26 AM
Hello Andrea,

These actions (setting data source, best-fit columns) should not be done in a DefferRefresh block. We are aware that these are expensive operations and we are doing the necessary to impact the performance at a minimum. Could you remove this block and see if the result is different?

I am looking forward to your reply.
 
Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
n/a
Top achievements
Rank 1
answered on 06 Dec 2018, 10:38 AM

Hello Dimitar,

I have added the DeferRefresh after some searches I have done in your forums and over Google, but the problem was (and is) there before that.

Removing the defer block is still resulting in the strange behavior, if i manually drag and resize the window, the grid gets refreshed and the columns gets bestfitted, while the second grid is already bestfitted

Thank you for your kind attention

Best regards

0
Dimitar
Telerik team
answered on 06 Dec 2018, 12:34 PM
Hi Andrea,

I have tested this and it works on my side. I have attached my test project. Could you please check it and let me know how it differs from your real setup? 

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
n/a
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
n/a
Top achievements
Rank 1
Share this question
or