开发者

How to resize a Data Grid View Column size

i want to resize c# data grid view column 开发者_如何学运维to a custom size. how i can do this?


Set the DataGridViewColumn.Width Property.

You can do this either in the Visual Studio Designer or through code:

DataGridViewColumn column = dataGridView.Columns[0];
column.Width = 60;

You should be aware that the DataGridViewColumn.AutoSizeMode Property setting can affect a column's width too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜