datagrid columns width

J

jijis

i want to ask how to set the width of a specified column even the data
included isn't long fit with it.
 
E

Elton W

Hi Jijis,

You can use HeaderStyle and ItemStyle to set column width:

<asp:BoundColumn DataField="DataField"
HeaderText="HeaderText">
<HeaderStyle HorizontalAlign="Center"
Width="220px"></HeaderStyle>
<ItemStyle Width="220px"></ItemStyle>
</asp:BoundColumn>


HTH

Elton Wang
(e-mail address removed)
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top