[英]How can I change the row height some particular row in DataGridView?
I have a grid view..in that i have a image column.. 我有一个网格视图..因为我有一个图像列..
when ever image coming to image column i want to increase my row height programatically 每当图像进入图像列时,我都想以编程方式增加行高
How can I change the row height some particular row in DataGridView? 如何更改DataGridView中某些特定行的行高?
您可以使用DataGridViewRow.Height
属性:
myGrid.CurrentRow.Height = someValue;
I think you are looking for AutoSizeMode 我认为您正在寻找AutoSizeMode
DataGridViewColumn column = dataGridView.Columns[2];
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
This will automaticly size it to fit. 这将自动调整大小以适合。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.