C# WinForms: My DataGridView does not grow properly

curiouswebster
curiouswebster used Ask the Experts™
on
I have a DataGridView that grows up to a point, as new rows are added. But then it stops growing and the new rows are added but not visible. There is no scroll bar, which is the primary problem.

I have on problem with the DataGridView growing up to a point where it grows no longer. But at that point I need a scroll to appear so the user can scroll down to see all those new rows added.

What property am I missing?

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
DataGridView1.ScrollBars = ScrollBars.Both

Commented:
or manually set the scrollbars property of the datagridview from the designer mode to "both"
curiouswebsterSoftware Engineer

Author

Commented:
It was already set to Both.
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Commented:
check if columns property Frozen is set to True
curiouswebsterSoftware Engineer

Author

Commented:
Where do I find that property? I construct the columns in code, but use the Designer to set the properties of the DataGridView.
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
Possibly the container of the grid is clipping it?

Set the AutoScroll() property of the Container (Form/Panel/TabPage etc...) to True.
curiouswebsterSoftware Engineer

Author

Commented:
I saw the AutoScroll property of the Form was false, so Ii set it to true.

My other problem is to get the DataGridView to understand what is it's containing object. I place it indie a Tab Control and it ignores that. I put in inside a Group Box and it ignores that as well. I will post that other question.
curiouswebsterSoftware Engineer

Author

Commented:
Thanks.

Below is the bigger problem: I can not get the DataGridView to appear anywhere near it's supposed to be, according to the Designer.

http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_27723484.html#a37993046

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial