I
ireallyneedtoknow2007
here is a cleaner version of a question I posted yesterday. I have
tried many versions of the code below but cannot get the column to
wrap. I am using asp.net 2.0 visual studio 2005. ultimately I will
be adding template columns as well, but really need this column to
wrap. thanks for your help
<asp:datagrid id="myDataGrid" style="Z-INDEX: 100; LEFT: 20px;
POSITION: absolute; TOP: 260px" runat=server
AllowSorting="True" Font-Size="X-Small" Font-Names="Verdana"
ForeColor="Black"
GridLines="None" CellPadding="2" BackColor="LightGoldenrodYellow"
BorderWidth="1px"
BorderColor="Tan" Width="100px" Height="304px"
OnPreRender="myDataGrid_PreRender" AutoGenerateColumns="False"
BorderStyle="Solid" CellSpacing="2">
<Columns>
<asp:BoundColumn DataField="contact_email" ReadOnly="True"
HeaderText="Emailx">
<ItemStyle Wrap="True" ></ItemStyle>
<HeaderStyle Width="5px" Wrap=true/>
</asp:BoundColumn>
</Columns>
</asp:datagrid>
public void myDataGrid_PreRender(object sender, System.EventArgs e)
{
myDataGrid.Columns[0].ItemStyle.Width = 30;
myDataGrid.Columns[0].ItemStyle.Wrap = true;
}
tried many versions of the code below but cannot get the column to
wrap. I am using asp.net 2.0 visual studio 2005. ultimately I will
be adding template columns as well, but really need this column to
wrap. thanks for your help
<asp:datagrid id="myDataGrid" style="Z-INDEX: 100; LEFT: 20px;
POSITION: absolute; TOP: 260px" runat=server
AllowSorting="True" Font-Size="X-Small" Font-Names="Verdana"
ForeColor="Black"
GridLines="None" CellPadding="2" BackColor="LightGoldenrodYellow"
BorderWidth="1px"
BorderColor="Tan" Width="100px" Height="304px"
OnPreRender="myDataGrid_PreRender" AutoGenerateColumns="False"
BorderStyle="Solid" CellSpacing="2">
<Columns>
<asp:BoundColumn DataField="contact_email" ReadOnly="True"
HeaderText="Emailx">
<ItemStyle Wrap="True" ></ItemStyle>
<HeaderStyle Width="5px" Wrap=true/>
</asp:BoundColumn>
</Columns>
</asp:datagrid>
public void myDataGrid_PreRender(object sender, System.EventArgs e)
{
myDataGrid.Columns[0].ItemStyle.Width = 30;
myDataGrid.Columns[0].ItemStyle.Wrap = true;
}