?
Solved

adding datagrids

Posted on 2005-05-02
5
Medium Priority
?
185 Views
Last Modified: 2010-04-07
      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?
0
Comment
Question by:ARACK04
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:MikeMCSD
ID: 13914397
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
 

Author Comment

by:ARACK04
ID: 13914404
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
 
LVL 33

Accepted Solution

by:
raterus earned 1200 total points
ID: 13914482
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
 
LVL 16

Assisted Solution

by:MikeMCSD
MikeMCSD earned 800 total points
ID: 13914546
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
 

Author Comment

by:ARACK04
ID: 13914584
Roger that.  I came to the same table conclusion myself.  Thanks much!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question