views:

1066

answers:

1

I recently upgraded my main computer and am now working in windows Vista. My dev environment is Microsoft Visual C# 2008 Express Edition.

I have a program that uses a DataGridView that I started developing on my old Win XP machine. Everything is now working fine on Vista except that the dataGridView won't resize when I resize the main application window. This works on the Win XP machine.

The dataGridView Anchor property is set to "Top, Left, Bottom, Right".

??

Thanks in advance!

-A

+1  A: 

Make sure the the Dock property is set to Fill (pick the part in the center of the layout), and that the MaximumSize is not set (0,0). Then let me know if is still does not resize.

cdonner
yep - those conditions are true as well (dock = fill and max != 0,0). Still does not resize! :(
adeena
actually - I noticed that when I changed "dock" to "fill", the anchor reset to "top, left". When I changed the anchor back to "top, left, bottom, right", then "dock" changed back to "none" automatically. ???
adeena
I just went through this myself. Do you have other things in the form? How are they docked? Play with the z-Index (right-click and send control to back or front). Unexpected things happen when you do that.
cdonner
Ah! It had been long enough since I worked on the project that I forgot that my dataGridView was embedded in a Split Container! That did it! :) Thanks!
adeena