Reputation: 315
I have achieved the following till now (Columns are NOT resizing automatically as per the size of the application):
I want to achieve the following so that columns resize dynamically whenever user changes the size of the application:
I am using DataGridView in .Net 2008
Upvotes: 2
Views: 4759
Reputation: 66509
Specify a value for DataGridViewAutoSizeColumnsMode
:
dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
You can set it in the grid properties at design-time too:
Upvotes: 4