开发者

How to resize a Data Grid View Column size

开发者 https://www.devze.com 2023-03-03 14:44 出处:网络
i want to resize c# data grid view column 开发者_如何学运维to a custom size. how i can do this?Set the DataGridViewColumn.Width Property.

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

精彩评论

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