Groups | Blog | Home
all groups > asp.net datagrid control > september 2004 >

asp.net datagrid control : Column won't resize in datagrid



VB Programmer
9/25/2004 5:41:23 PM
I cannot get my first 2 columns to adhear to my width settings. Any ideas?

The datagrid is defined as:

<asp:DataGrid id="dgLog" runat="server" Width="990px" Height="96px"
BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" BackColor="White" CellPadding="3"
Font-Names="Verdana" AutoGenerateColumns="False"
GridLines="Vertical" Font-Size="X-Small">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<HeaderStyle Font-Names="Verdana" Font-Bold="True"
HorizontalAlign="Center" ForeColor="White"
BackColor="#000084"></HeaderStyle>
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Subject" HeaderText="Subject">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</asp:DataGrid>

Juno
9/25/2004 10:49:41 PM
Hi,

I saw you set the width of datagrid to 990px, however you aslo defined each
columns' width(150px,250px,250px).
And 150+250+250 not equals to 990. So what are you want datagrid to be? :-)

--
Juno
MCSD.NET, MCDBA, MCSE
----------------------------------------------------------
Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
DataForm.NET - The most powerful data entry web server control for ASP.NET



[quoted text, click to view]

VB Programmer
9/27/2004 10:11:15 PM
I want it to match the indiv widths. Since the dg width is bigger does it
obsolete the others?

[quoted text, click to view]

AddThis Social Bookmark Button