Connecting Tech Pros Worldwide Forums | Help | Site Map

layout problem: aligning several datagrids vertically

Mark Wiewel
Guest
 
Posts: n/a
#1: Mar 2 '06
hi all,

i am a newbie in ASP.NET and i couldn't find the solution to this one:

i have a form with three datagrids on it. i would like to align them
vertically with a space between each grid of about 20px. the amount of
rows in those grids is changing, but the position of each datagrid
seems to be fixed. this results in a grid overlaying another one or the
space between two grids is way too high.

how can i change this? i would love to put each grid dynamically 20px
below the predecessor grid, no matter how many rows are in there.

is there a solution to this one?

cheers, mark


Eliyahu Goldin
Guest
 
Posts: n/a
#2: Mar 2 '06

re: layout problem: aligning several datagrids vertically


Use FlowLayout.

Eliyahu

"Mark Wiewel" <wiewel@gmail.com> wrote in message
news:1141302351.332259.232390@i40g2000cwc.googlegr oups.com...[color=blue]
> hi all,
>
> i am a newbie in ASP.NET and i couldn't find the solution to this one:
>
> i have a form with three datagrids on it. i would like to align them
> vertically with a space between each grid of about 20px. the amount of
> rows in those grids is changing, but the position of each datagrid
> seems to be fixed. this results in a grid overlaying another one or the
> space between two grids is way too high.
>
> how can i change this? i would love to put each grid dynamically 20px
> below the predecessor grid, no matter how many rows are in there.
>
> is there a solution to this one?
>
> cheers, mark
>[/color]


DWS
Guest
 
Posts: n/a
#3: Mar 2 '06

re: layout problem: aligning several datagrids vertically


Mark,

Three ideas for you. I like this first one best cause it adds a visual
element that you can set to your liking and is easy add a line between
datagrids
Make sure your are in flow layout. Put a horizontal rule line after each
datagrid.
<hr />

add linebreaks between datagrids
Make sure you are in flow layout. Put two line breaks after each datagrid
<br /><br /> .

A more complex solution put your data grids inside a table. I'm guessing on
the 20px row play around with this a little bit.

<table>
<tr><td><datagrid></td></tr>
<tr><td height=20> </td></tr>
<tr><td><datagrid1></td></tr>
<tr><td height=20> </td></tr>
<tr><td><datagrid2></td></tr>
<tr><td height=20> </td></tr>
<tr><td><datagrid3></td></tr>
<tr><td height=20> </td></tr>
<tr><td><datagrid4></td></tr>
</table>

Good Luck
DWS


"Mark Wiewel" wrote:
[color=blue]
> hi all,
>
> i am a newbie in ASP.NET and i couldn't find the solution to this one:
>
> i have a form with three datagrids on it. i would like to align them
> vertically with a space between each grid of about 20px. the amount of
> rows in those grids is changing, but the position of each datagrid
> seems to be fixed. this results in a grid overlaying another one or the
> space between two grids is way too high.
>
> how can i change this? i would love to put each grid dynamically 20px
> below the predecessor grid, no matter how many rows are in there.
>
> is there a solution to this one?
>
> cheers, mark
>
>[/color]
Mark Wiewel
Guest
 
Posts: n/a
#4: Mar 8 '06

re: layout problem: aligning several datagrids vertically


Thanks a lot for your help. I switched to flow layout and decided to
put the datagrids into relative-positioned DIVs. The problem was:
switching to flow layout doesn't remove the positioning rules in the
datagrid-tag. I had to remove them manually.

They are aligning now perfectly the way I wanted.

Cheers, Mark

Closed Thread