GridView Created a by C# Windows Application

How can you make a GridView fill  and ensure the columns spread across the Grid with showing the column content fully?

Capture.PNG
Lawrence AverySystem DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
In your designer expand the grid to be the size of the form.  Then set the Grid's left and right anchors.  This will make the grid's edges be the same distance as the form resizes.

In addition you can modify the column's AutoSizeMode and fill weight as necessary to give more width to the columns that are needed.
0
Lawrence AverySystem DeveloperAuthor Commented:
I will try to see if that works tomorrow. Can you anchor to a Collapsible Panel instead of a Form?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kyle AbrahamsSenior .Net DeveloperCommented:
Yes.  Anchor will work on any control container.  (Panel, Group Box, SplitContainer, etc.)
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Kyle AbrahamsSenior .Net DeveloperCommented:
Scrollbars will only appear if they need to be there.  Try shrinking the window.
0
Lawrence AverySystem DeveloperAuthor Commented:
Shrinking the window does not turn on scrollbars. I'll open a new question in regards to this.
0
Lawrence AverySystem DeveloperAuthor Commented:
I did notice when I did this that the scrollbars do not work. Is this a side affect of doing this Fill?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

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.