I'm demoing the ASP.NET controls and are a bit baffled at the way the grid renders. When I enable scrolling and Static headers, all of the headers do NOT match the columns in the grid. The alignments are way off in IE and FF.
Am I missing something? I don't have any of the column widths specified, I want the browser to decide.
Josh
Am I missing something? I don't have any of the column widths specified, I want the browser to decide.
Josh
4 Answers, 1 is accepted
0

Joshua
Top achievements
Rank 1
answered on 19 Jan 2009, 06:15 PM
I now see in the documentation it says that I HAVE TO have widths for each column. Really? I already have a grid control with static headers that I made that doesn't even require that..
0
Accepted
Hi Joshua,
You don't have to specify any widths in order to have properly aligned columns. Can you please tell where in the documentation is that?
Here is a KB article that can give you some clues what's wrong:
http://www.telerik.com/support/kb/aspnet-ajax/grid/how-to-align-radgrid-cells-when-using-scrolling-and-gridlines.aspx
Other possible reasons for the alignment to not work are:
1) Javascript errors on the page
2) RadGrid is initially invisible on the page (inside a hidden container with a display:none style). In this case you need to call the repaint() client-side method to RadGrid once it becomes visible.
If you still have difficulties resolving the issue on your side, please send us a runnable example, so that we can check it.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You don't have to specify any widths in order to have properly aligned columns. Can you please tell where in the documentation is that?
Here is a KB article that can give you some clues what's wrong:
http://www.telerik.com/support/kb/aspnet-ajax/grid/how-to-align-radgrid-cells-when-using-scrolling-and-gridlines.aspx
Other possible reasons for the alignment to not work are:
1) Javascript errors on the page
2) RadGrid is initially invisible on the page (inside a hidden container with a display:none style). In this case you need to call the repaint() client-side method to RadGrid once it becomes visible.
If you still have difficulties resolving the issue on your side, please send us a runnable example, so that we can check it.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Joshua
Top achievements
Rank 1
answered on 20 Jan 2009, 02:23 PM
Controls/RadGrid/Grid Columns/Resizing Columns:
When scrolling is enabled (the ClientSettings.Scrolling.AllowScroll property is True) and the grid columns have static headers, table-layout is always fixed. Because of this, when enabling scrolling, you should provide a valid width attribute for the columns.
I read that as a requirement, but maybe that wasn't the intent.
I also figured out my problem with them showing up weird, yes it was javascript errors. Thanks for your help.
When scrolling is enabled (the ClientSettings.Scrolling.AllowScroll property is True) and the grid columns have static headers, table-layout is always fixed. Because of this, when enabling scrolling, you should provide a valid width attribute for the columns.
I read that as a requirement, but maybe that wasn't the intent.
I also figured out my problem with them showing up weird, yes it was javascript errors. Thanks for your help.
0
Hello Joshua,
Yes, that text needs a little tweaking - valid column widths in fixed TableLayout mode are required if you don't want all columns to be equally wide (which is the default behavior when the table layout is fixed). Thanks for pointing this out.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Yes, that text needs a little tweaking - valid column widths in fixed TableLayout mode are required if you don't want all columns to be equally wide (which is the default behavior when the table layout is fixed). Thanks for pointing this out.
Best wishes,
Dimo
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.