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="<img
src="images/BlueArrow.gif"border=0>" 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>
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="<img
src="images/BlueArrow.gif"border=0>" 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>