开发者

How can I make a Winforms datagridview expand column widths to fit content?

I need my开发者_如何学Python columns to be only as big as the largest value in that column.

Is there a setting somewhere I can set?

Thank you.


You can set the AutoSizeColumnsMode property to DataGridViewAutoSizeColumnsMode.AllCells (or the appropriate value for you). Or call AutoResizeColumns() to resize the columns as you need it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜