Why does the datagrid ignore my set widths?

E

et

I have a grid with 4 columns and the grid will span the entire width of the
page, and seems to ignore the widths I set: Any idea why and what to do?
When I get a long lanstname, or long organization name, it spans the entire
page and looks silly. I do have wrap text checked.

<asp:datagrid id=dg runat="server" autogeneratecolumns="False"
HorizontalAlign="Right" BorderColor="Blue" BorderWidth="1px">
<HeaderStyle Font-Bold="True" Width="10px">
</HeaderStyle>

<Columns>
<asp:HyperLinkColumn Text="&lt;img
src=&quot;images/BlueArrow.gif&quot;border=0&gt;" Target="_blank"
DataNavigateUrlField="id"
DataNavigateUrlFormatString="../frmContacts.aspx?id={0}"></asp:HyperLinkColumn>

<asp:BoundColumn Visible="False" DataField="ID"
ReadOnly="True"></asp:BoundColumn>

<asp:BoundColumn DataField="ContactName" HeaderText="Last
Name"></asp:BoundColumn>

<asp:BoundColumn DataField="OrganizationName" HeaderText="Organization">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>

</Columns>
</asp:datagrid>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top