adding datagrids

      me.controls.addat(1, dg1)
       me.controls.addat(2, dg2)
       me.controls.addat(3, dg3)

dg1 dg2 and dg3 are all datagrids.  When I execute this code, I get a newline in between each datagrid.  Is there any way to get them to show up next to each other?
ARACK04Asked:
Who is Participating?
 
raterusConnect With a Mentor Commented:
This is just simple html layout at this point, easiest way is to use a table.  Since you are using dynamic controls, you may need to do this

Dim t as table = new table
Dim tr as tablerow = new tablerow
Dim td as tablecell = new tablecell
td.controls.add(dg1)
tr.controls.add(td)
td = new tablecell
tr.controls.add(dg2)
td = new tablecell
tr.controls.add(dg3)
t.controls.add(tr)
me.controls.add(t)

..

The end result of this will look like this in html

<table>
  <tr>
    <td><!-- DataGrid 1 --></td>
    <td><!-- DataGrid 2 --></td>
    <td><!-- DataGrid 3 --></td>
  </tr>
</table>
0
 
MikeMCSDCommented:
A Table might do it, try:

<TABLE WIDTH="1005" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD>dg1</TD>
<TD>dg2</TD>
<TD>dg3</TD>
</TR>
</TABLE>
0
 
ARACK04Author Commented:
dg1 dg2 and dg3 are all datagrids.  I want to display an entire datagrid with each of the commands.  I believe what you wrote will only display the letters dg1
0
 
MikeMCSDConnect With a Mentor Commented:
Ok, here's the full version:

me.pageCell1.controls.addat(1, dg2)
me.pageCell2.controls.addat(2, dg2)
me.pageCell3.controls.addat(3, dg3)


<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<td id="pageCell1" runat="server" vAlign=top width="100%"></td>
<td id="pageCell2" runat="server" vAlign=top width="100%"></td>
<td id="pageCell3" runat="server" vAlign=top width="100%"></td>
</TR>
</TABLE>
0
 
ARACK04Author Commented:
Roger that.  I came to the same table conclusion myself.  Thanks much!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.