Home All Groups Group Topic Archive Search About
Author
3 Feb 2005 3:52 AM
CDX
I have a dataGrid on a form, In design mode it behaves as I would expect
when resizing the form. However when I populate it when running, it no
longer resizes the same way. Seems like when the # of rows changes, it
tries to resize to fit the number of rows.


I'd like to to stay next to the border on the top, left and right, but a
specific number of pixels from the bottom, no matter how it is resized.

Thanks,
Chip

Author
3 Feb 2005 8:29 AM
Eliyahu Goldin
Chip,

Likely, the grid tries to resize because you've set it's height explicitly.
Don't do this and the grid will take exact space it needs to render all the
rows in their natural height. Now, to fill up the bottom, place the grid
inside a panel with the same color as the grid's background. For the panel
you can safely specify the height you wish. For the user the grid and the
panel will look like just one grid.

Eliyahu

Show quoteHide quote
"CDX" <cdy@noSpamDiceNoSpamHome.Com> wrote in message
news:1q2dnRiyWPG0PZzfRVn-uA@comcast.com...
> I have a dataGrid on a form, In design mode it behaves as I would expect
> when resizing the form. However when I populate it when running, it no
> longer resizes the same way. Seems like when the # of rows changes, it
> tries to resize to fit the number of rows.
>
>
> I'd like to to stay next to the border on the top, left and right, but a
> specific number of pixels from the bottom, no matter how it is resized.
>
> Thanks,
> Chip
Author
4 Feb 2005 3:19 AM
CDX
Eliyahu,
I see the Size option in properties, but what do I do to not set the
height explicitly? I tried 0,0 but that doesn't seem right.

Chip



Eliyahu Goldin wrote:

Show quoteHide quote
> Chip,
>
> Likely, the grid tries to resize because you've set it's height explicitly.
> Don't do this and the grid will take exact space it needs to render all the
> rows in their natural height. Now, to fill up the bottom, place the grid
> inside a panel with the same color as the grid's background. For the panel
> you can safely specify the height you wish. For the user the grid and the
> panel will look like just one grid.
>
> Eliyahu
>
> "CDX" <cdy@noSpamDiceNoSpamHome.Com> wrote in message
> news:1q2dnRiyWPG0PZzfRVn-uA@comcast.com...
>
>>I have a dataGrid on a form, In design mode it behaves as I would expect
>>when resizing the form. However when I populate it when running, it no
>>longer resizes the same way. Seems like when the # of rows changes, it
>>tries to resize to fit the number of rows.
>>
>>
>>I'd like to to stay next to the border on the top, left and right, but a
>>specific number of pixels from the bottom, no matter how it is resized.
>>
>>Thanks,
>>Chip
>
>
>
Author
6 Feb 2005 9:34 AM
Eliyahu Goldin
Chip,

What is your platform? Here we are talking about asp.net grid. It doesn't
have Size property, rather Height and Weight. You are probably talking about
Windows.Form one.

Eliyahu

Show quoteHide quote
"CDX" <Ch***@DiceHome.com> wrote in message
news:VMSdnYvMtKBJdJ_fRVn-rg@comcast.com...
> Eliyahu,
> I see the Size option in properties, but what do I do to not set the
> height explicitly? I tried 0,0 but that doesn't seem right.
>
> Chip
>
>
>
> Eliyahu Goldin wrote:
>
> > Chip,
> >
> > Likely, the grid tries to resize because you've set it's height
explicitly.
> > Don't do this and the grid will take exact space it needs to render all
the
> > rows in their natural height. Now, to fill up the bottom, place the grid
> > inside a panel with the same color as the grid's background. For the
panel
> > you can safely specify the height you wish. For the user the grid and
the
> > panel will look like just one grid.
> >
> > Eliyahu
> >
> > "CDX" <cdy@noSpamDiceNoSpamHome.Com> wrote in message
> > news:1q2dnRiyWPG0PZzfRVn-uA@comcast.com...
> >
> >>I have a dataGrid on a form, In design mode it behaves as I would expect
> >>when resizing the form. However when I populate it when running, it no
> >>longer resizes the same way. Seems like when the # of rows changes, it
> >>tries to resize to fit the number of rows.
> >>
> >>
> >>I'd like to to stay next to the border on the top, left and right, but a
> >>specific number of pixels from the bottom, no matter how it is resized.
> >>
> >>Thanks,
> >>Chip
> >
> >
> >