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

Auto Resize on Page load

2 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SRich
Top achievements
Rank 1
SRich asked on 18 Nov 2008, 02:47 PM
I have a simple grid bound to a DB table.  The number of columns is not know at runtime so I can't hard code the column widths in. When the grid renders itself it first draws itself.  Then there is a flicker and it adjusts the size of the columns to better fit the data.  Is there anyway to prevent this double drawing?

2 Answers, 1 is accepted

Sort by
0
SRich
Top achievements
Rank 1
answered on 18 Nov 2008, 03:20 PM
I found the problem.  I had "enable scrolling" turned on and this was causing the issue.
0
Dimo
Telerik team
answered on 18 Nov 2008, 03:21 PM
Hello Scott,

When scrolling with static headers is enabled for RadGrid, the control must recalculate and adjust its dimensions on the client, otherwise the column headers may not be aligned with the data cells below them. In order to remove the flicker completely, you will have to remove the UseStaticHeaders="True" setting or set it to "False".

If you have to use scrolling with static headers, you can at least remove the vertical resizing flicker by setting ScrollHeight in the Scrolling settings of RadGrid. In this case you should remove the RadGrid's Height property.

Let us know if you need more information.


Best wishes,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
SRich
Top achievements
Rank 1
Answers by
SRich
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or