Setting width of a column in a DataGrid

G

Guest

Hi l&g

It's weird but I can't find an easy way to set the width of a column in a DataGrid. It must be hidden somewhere. I searched google but it's all vb-ish and not to the point. Can someone sketch me how I should do this

What I actually want to do is to specify the width of a column relative to the width of the DataGrid control so that the columns always span the entire width of the DataGrid. For instance 4 columns, 10%, 20%, 30% and 40%

Thanks
 
A

Arne Janning

TT said:
Hi l&g,

It's weird but I can't find an easy way to set the width of a column in a DataGrid. It must be hidden somewhere. I searched google but it's all vb-ish and not to the point. Can someone sketch me how I should do this?

What I actually want to do is to specify the width of a column relative to the width of the DataGrid control so that the columns always span the entire width of the DataGrid. For instance 4 columns, 10%, 20%, 30% and 40%.

Thanks,

Hi Tom,

http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q792q

Cheers

Arne Janning
 
L

Lord Fonty

And if you want percentages then:

width = Unit.Percentage(10);


a DataGrid. It must be hidden somewhere. I searched google but it's all
vb-ish and not to the point. Can someone sketch me how I should do this?to the width of the DataGrid control so that the columns always span the
entire width of the DataGrid. For instance 4 columns, 10%, 20%, 30% and 40%.
 

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

Top