SimpleGridBuilder (ASP class definition)

Posted by Daniel - 457 Views

averagecoder_simplegridbuilder.gifCan we display data from a database on a web page with a minimal work? well, there will be no pure instant things to achieve that, but at least we can minimize the steps when we do the job.

I created Simple Grid Builder - a simple ASP class definition - to make it easier for me when I need to display data from the database in a grid layout. The purpose is to assemble a reusable component by providing some flexible settings on it, so the component can be deployed in more than one application.

SimpleGridBuilder contains one sub procedure only, it uses all of the available settings value to display the grid. Below is the list of the available properties.

Property Description
DataSource Connection
string to the database
RecordSource SQL statement
to retrieve the data
BorderColor Grid border
color
CellSpacing Spacing
between each grid?s cell
CellPadding Padding
between each grid?s cell
ColWidth Column width
HeaderBackColor Header?s
background color
HeaderFontFace Header?s font face
HeaderFontSize Header?s font
size
HeaderFontColor Header?s font
color
DataBackColor The background
color for the data section
DataFontFace The font face
for the data section
DataFontSize The font size
for the data section
DataFontColor The font color
for the data section

There is a sample included in this article. Just download it then follow the instruction provided in the sample in order to run it on your machine.

The SimpleGridBuilder Class code along with the example of use can be downloaded here (9 KB)

share this article

Digg del.icio.us Netscape StumbleUpon Yahoo! MyWeb reddit Furl Magnolia Newsvine Technorati SlashDot Blinklist Simpy Google
This post as PDFPosted in: Tested Software - January 2008


Leave a Reply


Options for your comment:





Hi, my name is Daniel Nugraha, a single male live on an island called Java, Indonesia. This is the place for me to share my interest in computer programming.

Coffee Break

Comments - Thanks Guys :)

  • Rangga Kusuma: Gan, Tengkiu buat postingan yang sangat berguna. Kebetulan ada project utk bikin sms gateway, dan converter Agan sangat berguna utk...
  • Chuck Norton: I actually went ahead & bolted over to Justin’s Get The Image plugin here: http://justintadlock.com/ar...
  • Chuck Norton: Question: is it possible to insert something like [custfieldimg=”joice1.jpg,15 0,1:1″] into the actual templates instead of...
  • Therese Lachance: Hi, Any idea how to have ContuttoPDF fetch the correct page language?
  • tresloukadu: yo how did u fixed when the tags shows <? and it shows < “& l t ; ” ?? please send me an email.