Solved

datareader -> custom html table

Posted on 2004-08-18
3
552 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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