简体   繁体   中英

Programatically set column width in DataGridView

I have a DGV I am binding to a list of objects. I set AutoSizeColumnsMode to Fill, so that the columns stretch to fill the entire DGV, however, currently they stretch in a way so all columns are equal width. How can i specify a weightage so that the first column be 30% of the width and the other be 70%?

最具体地说,在我看来,您可以使用“AutoSizeColumsMode”=“Fill”,然后将每列上的“FillWeight”设置为您要查找的%。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM