Home All Groups Group Topic Archive Search About

resizing datagrid with form?

Author
25 Jan 2006 8:40 PM
Rich
Hello,

If I place a panel control on a form and place a datagrid on the panel, is
there a property for the panel to resize with the form?  I am sure there is. 
I just can't remember what the setting is/are.

Once the pane resizes with the form if I place a datagrid on the panel and
dock it or anchor it will that resize the datagrid also?  How can I make it
so that if the form gets resized, the datagrid gets resized with the form?

Thanks,
Rich

Author
25 Jan 2006 8:42 PM
Rich
I figured it out.  You have to dock the panel to the form by selecting any
one of 5 docking modes in the Dock property of the Panel, then do the same
with the datagrid, select any one of the 5 docking modes in the Dock property
of the datagrid.

Show quoteHide quote
"Rich" wrote:

> Hello,
>
> If I place a panel control on a form and place a datagrid on the panel, is
> there a property for the panel to resize with the form?  I am sure there is. 
> I just can't remember what the setting is/are.
>
> Once the pane resizes with the form if I place a datagrid on the panel and
> dock it or anchor it will that resize the datagrid also?  How can I make it
> so that if the form gets resized, the datagrid gets resized with the form?
>
> Thanks,
> Rich
Author
26 Jan 2006 2:39 AM
Toff McGowen
docking is one way, anchoring is the other. Anchoring allows controls to
float about a particular form space rather than being bound to a given form
edge.

tm

Show quoteHide quote
"Rich" <R***@discussions.microsoft.com> wrote in message
news:208A979C-6293-4FED-AFB0-BFC5AD6873F9@microsoft.com...
> I figured it out.  You have to dock the panel to the form by selecting any
> one of 5 docking modes in the Dock property of the Panel, then do the same
> with the datagrid, select any one of the 5 docking modes in the Dock
property
> of the datagrid.
>
> "Rich" wrote:
>
> > Hello,
> >
> > If I place a panel control on a form and place a datagrid on the panel,
is
> > there a property for the panel to resize with the form?  I am sure there
is.
> > I just can't remember what the setting is/are.
> >
> > Once the pane resizes with the form if I place a datagrid on the panel
and
> > dock it or anchor it will that resize the datagrid also?  How can I make
it
> > so that if the form gets resized, the datagrid gets resized with the
form?
> >
> > Thanks,
> > Rich