Solved

datareader -> custom html table

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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