简体   繁体   中英

AutoSize DataGridView in Vb.net

How can the table be auto fitted in the DataGridView using VB.NET ? The operations like AutoSizeColumn and AutoSizeRows are only for the data inside the table. I want to fit the table inside the Viewbox in such a manner that no extra space will left.

You'll have to calculate and set the row heights/column widths yourself, based on the height/width of the DataGridView .

This is most often (and most effectively) done in the Resize event handler.

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