Solved

datareader -> custom html table

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now