Solved

datareader -> custom html table

Posted on 2004-08-18
3
557 Views
Last Modified: 2012-08-13
say I run a query which has 18 rows returned, how to I output the returned data to a table using the following layout of the data?  I only want 3 columns.

==========
| 1| 7|13|
==========
| 2| 8|14|
==========
| 3| 9|15|
==========
| 4|10|16|
==========
| 5|11|17|
==========
| 6|12|18|
==========


additionally, say there were 19 records returned, how could I dynamically add the 19th record while still using 3 colums?

==========
| 1| 8|15|
==========
| 2| 9|16|
==========
| 3| 10|17|
==========
| 4|11|18|
==========
| 5|12|19|
==========
| 6|13| - |
==========
| 7|14| - |
==========

If I were using classic asp I could do it rather quickly. I know I need to use mod, but I am unsure of the syntax in vb.net to accomplish this task to display the output in this format.

Basically I am looking for someone to help me put the pieces together, with source code.
0
Comment
Question by:kapcreations
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
davisg090767 earned 500 total points
ID: 11836552
Hi,

I'm not at my puter at the moment so I can't provide you with a code solution but couldn't you just use a DataList control for this? I know you can specify the number of columns and you could use a template to test for a value, if there is one use it, if not use "-"

If you don't get any joy, I could provide you with the code.

Geoff.
0
 
LVL 1

Author Comment

by:kapcreations
ID: 11836916
thanks, that is what I was looking for.  I had never used a DataList before and was not aware of the functionality.
0
 
LVL 2

Expert Comment

by:davisg090767
ID: 11838052
Glad I could help, if you need any further help with this let me know.

Geoff.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

719 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