Changing the with of an unbound datagrid

K

Kevin Humphreys

Hi,
I have a basic datagrid. But I want to change the width of one of the
columns. The problem is all of the columns are the same width.
I am using an unbound datagrid being filled by a dataset.

Can you help?

Thanks In Advance,

Kevin.
 
E

Elton Wang

Hi Kevin,





I assume that you are using AutoGenerateColumns="True" to bind the datagrid.
If so, you can set width of each column. In order to control width of
column, you need to apply AutoGenerateColumns="False". Then create either
Bound Column or Template Column for each data field and assign
HeaderStyle-Width and ItemStyle-Width values.


HTH
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top