• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 92
  • Last Modified:

How do I dynamically change the width of my grid?

I have a DataGridView control on a desktop app. that I've created to hold the results of a query. When there are many columns returned, I'd like to be able to stretch the width of the grid either manually or have it dynamically growth (length and or height) with the  manual rezizing of the form that the grid lives on. How do I do this?

grid default width
need to stretch grid to fit form width
Michael Sterling
Michael Sterling
  • 2
1 Solution
Set the anchor property on the grid (add the right and bottom) to make it grow when the form is resized.
Michael SterlingWeb Applications DeveloperAuthor Commented:
Michael SterlingWeb Applications DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now