Wrap text in datagrid

D

Diego

Hi,
how do I set the wrap property to FALSE for a datagrid with autocolums
enabled?
I know there's a work around this bug when the columns are set up in design
time but I need the autocolumns option checked.

Thanks in advance.
Diego.
 
J

Jeffrey Palermo [MCP]

Diego,
The AutoGenerateColumns is a great feature, but with the ease of
development you gain, you lose control. To forbid test wrapping, you need
to explicitly define your columns so that you can tell a specific column not
to wrap the text. Now, you can set wrapping on every column.
<asp:DataGrid Runat="server" AutoGenerateColumns=True>
<ItemStyle Wrap=False></ItemStyle>
</asp:DataGrid>
This will forbid every column to wrap text.

Best regards,
Jeffrey Palermo
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top