layout problem: aligning several datagrids vertically

M

Mark Wiewel

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
 
G

Guest

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
 
M

Mark Wiewel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top