Last post Aug 28, 2011 12:48 PM by Dassier
Member
429 Points
3843 Posts
Nov 13, 2007 09:24 PM|shapper|LINK
Hello,
How can I apply a 400 px width to a column header?
Thanks,
Miguel
Star
9617 Points
3788 Posts
Nov 14, 2007 01:58 AM|e_screw|LINK
<asp:GridView ID="GridView1" runat="server"....> <Columns> <asp:BoundField DataField.....> <ItemStyle HorizontalAlign="Left" Width="400px" /> <HeaderStyle HorizontalAlign="Left" Width="400px" /> </asp:BoundField> </Columns> </asp:GridView>
Thanks
-Mark post(s) as "Answer" that helped you
Nov 14, 2007 08:22 AM|shapper|LINK
Mark,
I know how to apply the styles, but when using CSS Control Adapters they are not applied!
I tried everything and nothing works.
Any idea?
I am starting to think that CSS Control Adapters leave to many things away.
60 Points
166 Posts
Nov 15, 2007 09:07 AM|bdemarzo|LINK
Try this:
<HeaderStyle HorizontalAlign="Left" CssClass="myClassName" />
Then, in your CSS file:
.myClassName { width:400px; }
The CSS adapters generally do not inject inline styles. The expectation is to use CSS classes instead.
14 Points
148 Posts
Aug 28, 2011 12:48 PM|Dassier|LINK
Sorry, wrong post.
Member
429 Points
3843 Posts
GridView. Header Style. Please, help me out. This is driving me nuts.
Nov 13, 2007 09:24 PM|shapper|LINK
Hello,
How can I apply a 400 px width to a column header?
Thanks,
Miguel
Star
9617 Points
3788 Posts
Re: GridView. Header Style. Please, help me out. This is driving me nuts.
Nov 14, 2007 01:58 AM|e_screw|LINK
Thanks
-Mark post(s) as "Answer" that helped you
Electronic Screw
Website||Blog||Dub@i.net
Member
429 Points
3843 Posts
Re: GridView. Header Style. Please, help me out. This is driving me nuts.
Nov 14, 2007 08:22 AM|shapper|LINK
Mark,
I know how to apply the styles, but when using CSS Control Adapters they are not applied!
I tried everything and nothing works.
Any idea?
I am starting to think that CSS Control Adapters leave to many things away.
Thanks,
Miguel
Member
60 Points
166 Posts
Re: GridView. Header Style. Please, help me out. This is driving me nuts.
Nov 15, 2007 09:07 AM|bdemarzo|LINK
Try this:
Then, in your CSS file:
.myClassName { width:400px; }
The CSS adapters generally do not inject inline styles. The expectation is to use CSS classes instead.
- blog: www.sidesofmarch.com
Member
14 Points
148 Posts
Re: GridView. Header Style. Please, help me out. This is driving me nuts.
Aug 28, 2011 12:48 PM|Dassier|LINK
Sorry, wrong post.