4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 07 May 2014, 04:00 AM
Hi Tom,
You can try the following ways to set the column width. Please note that you have to set only the HeaderStyle width property and not ItemStyle's.
In ASPX:
From C#:
Using CSS:
ASPX:
If this doesn't help, please provide your code snippet.
Thanks,
Princy
You can try the following ways to set the column width. Please note that you have to set only the HeaderStyle width property and not ItemStyle's.
In ASPX:
<
telerik:GridBoundColumn
DataField
=
"ShipCity"
HeaderText
=
"ShipCity"
UniqueName
=
"ShipCity"
Aggregate
=
"Count"
>
<
HeaderStyle
Width
=
"500px"
/>
</
telerik:GridBoundColumn
>
From C#:
protected
void
RadGrid1_PreRender(
object
sender, EventArgs e)
{
RadGrid1.MasterTableView.GetColumn(
"ShipCity"
).HeaderStyle.Width = Unit.Pixel(500);
}
Using CSS:
<style type=
"text/css"
>
.setWidth
{
width
:
500px
;
}
</style>
ASPX:
<
telerik:GridBoundColumn
DataField
=
"ShipCity"
HeaderText
=
"ShipCity"
UniqueName
=
"ShipCity"
Aggregate
=
"Count"
>
<
HeaderStyle
CssClass
=
"setWidth"
/>
</
telerik:GridBoundColumn
>
If this doesn't help, please provide your code snippet.
Thanks,
Princy
0

Tom
Top achievements
Rank 1
answered on 07 May 2014, 01:17 PM
Thanks Princy; I'm very new to Telerik but have many years of sql and C#. I see that there are many configuration wizards. I will be a big user of the grid. Is there any way to create a template from an existing RadGrid that I have built successfully? Any help would be greatly appreciated.
Thanks again
Tom
Thanks again
Tom
0

Princy
Top achievements
Rank 2
answered on 08 May 2014, 09:39 AM
Hi Tom,
I'm not clear about your requirement. Can you please elaborate on what you want to acquire so as to help you.
Thanks,
Princy
I'm not clear about your requirement. Can you please elaborate on what you want to acquire so as to help you.
Thanks,
Princy
0

Tom
Top achievements
Rank 1
answered on 08 May 2014, 01:10 PM
Thanks, I got it fixed. I think my setup was wrong. All is working
ok now.
Thanks again.
ok now.
Thanks again.