Vlad Schnakovszki
Vlad Schnakovszki

Reputation: 8601

Resizing a DataGridView in C#

I have a form that has a DataGridView as it's main component. I need to resize the DGV when the user maximizes the form.

As I read online, this cannot be done programatically.

The program is written in C# and uses WinForms. How would you do it?

Upvotes: 0

Views: 679

Answers (2)

General Grey
General Grey

Reputation: 3688

Another option is to use the docking property,

Upvotes: 1

Mitja Bonca
Mitja Bonca

Reputation: 4546

Use Anshor property, and set to all four sides (top, right, botton and left). This way the datagridview will resize together with form.

Upvotes: 8

Related Questions