Soumya Kanti Naskar
Soumya Kanti Naskar

Reputation: 1081

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.

Upvotes: 0

Views: 743

Answers (1)

InteXX
InteXX

Reputation: 6367

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.

Upvotes: 1

Related Questions