By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,131 Members | 1,728 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,131 IT Pros & Developers. It's quick & easy.

datagridview on a splitcontainer on a form

P: n/a

Ive got a datagridview, on a splitcontainer, in a

The datagrid view by default shows 3 colums of data and fills exactly
the size of the user control form.

This control is then called from another c# solution, and it displays
fine when called and shown.

My problem is that at some point a user has the option to display more
colums of data in the datagridview, and this causes the horizotal
scroll bard to appear and the columns are now off the edge of the
window and you need to scroll back and forwards to see it.

What i want is a way to make the parent usercontrol and form
autoresize wider when more columns are displayed in the datagrid view.
I then want the user control to auto shrink when the number of
displayed columns is reduced. In short i want the host usercontrol
/form to auto resize up and down to fit around the new size of the
displayed datagridview.

I have tried all the anchor/dock fill, auto resize options,
eliminating the horizontal scroll bar, but the hosting form never
resizes, the datagridview columns always disappear of the edge of the

I am using vs 2005 c#, if anyone can help please or point me in the
right direction


Apr 3 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.