user541597
user541597

Reputation: 4345

resizing gridview column manually

I have a gridview that I am displaying email html in. The columns are very wide because of the way the html is formated. How can I manually set the size of the column in the gridview? I tried

Item-Style width =

Header-Style width =

but none of those change the column width, any ideas would be appreciated.

Thank you,

 <asp:BoundField HeaderText="Message"  HeaderStyle-Width="100px" ItemStyle-Width="100px" ItemStyle-Wrap="false" HeaderStyle-Wrap="false" HtmlEncode="false" DataField="message" />

Upvotes: 1

Views: 1864

Answers (1)

gwt
gwt

Reputation: 2423

follow this pattern , and you will succeed , good luck ;)

<asp:BoundField DataField="ISBN" HeaderText="ISBN" ItemStyle-Width="120px" HeaderStyle-Height="40px">
     <HeaderStyle Height="40px"></HeaderStyle>
     <ItemStyle Width="120px"></ItemStyle>
</asp:BoundField>

Upvotes: 1

Related Questions