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

set Column Width / size

1 Answer 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rene
Top achievements
Rank 1
Rene asked on 25 Nov 2008, 04:12 PM
Hi guys, I am trying to set a fixed size of a rad grid column to prevent the columns get resized on each page (paging enabled) - depending on their content.

The other thing I want to accomplish is to restrict the grid from displaying more than I specified - and if the content is too long it should get cut.

Is there a way to do this with a setting/property of the RadGrid, because I haven't found anything?

thank you very much, yours, Rene Weiss

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Nov 2008, 04:45 PM
Hi Rene,

You should set:

1) HeaderStyle.Width for the column that you wish to fix
2) TableLayout="Fixed" for the MasterTableView
3) ItemStyle.Wrap and HeaderStyle.Wrap should be False

This is enough to achieve what you want in Internet Explorer. In Firefox, you also need to add the following CSS rule:

4) CSS

.GridRow_SkinName  td,
.GridAltRow_SkinName  td

{
     overflow: hidden;
}


Kind regards,
Dimo
the Telerik team

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