Reputation: 337
I want my dataGridView collumns to stretch when I change window size, I added anchor properties to grid view, but it only resizes background, not collumns, how can I do this? My problem looks like:
Upvotes: 0
Views: 2290
Reputation: 54433
See here: MSDN on DataGridViewColumn.AutoSizeMode
and here:
MSDN on AutoSizeColumnMode Enumeration
Maybe this is what you want :
All fill-mode columns in the control divide the available space in proportions determined by their FillWeight property values.
But finding out what you want is not as easy as most people think. Your images show a change not only in size bur also in font size. Is that really what you want?? I hope not, as this would surprise the user who is used to get more data on the windows when making it larger and won't expect to see larger fonts..
To get there set the properties of all columns you want to participate is the resize.
Upvotes: 0