DataGrid width size

G

Guest

I would like to know how to change the datagrid column width size in a
Windows application. Thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Joseph,

For the data grid, you will have to get the DataGridColumnStyle instance
that corresponds to the column you want to set the width of. You can get
this through the TableStyle that the grid is bound to.

For the DataGridView, you can get the DataGridViewColumn instance
through the Columns property on the DataGridView, and then set the Width
property.

Hope this helps.
 

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