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

radgrid header shrinked when window resized.

3 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dexter
Top achievements
Rank 1
dexter asked on 13 Mar 2012, 08:48 AM
Hi,

I have a radgrid inside a radwindow. And in my case, i need to set the width of the radwindow after the page loads.
Problem with this is, when the radwindow resizes, the grid also resizes. This is all fine except for the grid header.
It appears shrinked to the left and a white gap appears on the right. How do i solve this?

Regards,
Dexter

PS:This only happens in IE

3 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 15 Mar 2012, 03:07 PM
Dexter:

You have not posted any of the code that defines your RadGrid instance. This type of behavior could be caused by having Static Headers. Is this your case?

Please refer to this forum post which provides a set of best practices for defining RadGrid and column sizing:

Best Practice for Grid and Column widths

Hope this helps!
0
dexter
Top achievements
Rank 1
answered on 16 Mar 2012, 03:24 AM
Hi jumpstart,

Thanks for your reply. I cant paste the code here as i have other codes that is jumbled up together.
Anyway, i'll try to describe it as clearly as possible. I hope you can help.

Yes, i'm using static header as i want to show the header when scrolling.
The column width is set by percentages and i left out one column without setting any width to it.
This grid is shown in a radwindow, which the width is determined by the length of the toolbar above it.

This is the scenario:
1) Parent page has already set the Radwindow width as 400px.
2) When launching the Radwindow for the first time, the calculated width for the toolbar inside the Radwindow is 700px.
3) The grid is resized automatically because the width is 100%. But this only applies to the item, the header doesn't resize
appropriately, leaving a blank area on the right.

Regards,
Dexter
0
Pavlina
Telerik team
answered on 16 Mar 2012, 04:20 PM
Hi,

Unfortunately the provided information is not enough for us to determine the cause for the described erroneous behaviour. Can you paste the problematic page code, so we can investigate the issue. Also can you please verify that you have not set different widths for headers and items and you have not set fixed width for MasterTableView?

Additionally, note that when static headers are enabled you should set fixed width for your columns through HeaderStyle-Width property.

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
dexter
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
dexter
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or