Class: clsDataGrid - Author: Nick DelMedico [www.pixel420.com]

Properties:
   .Connection - The connection object to use if one exists (default is none)
   .Command - The SQL query to build the grid from (Required)
   .GridClassName - Name of a CSS class to apply to the grid (default is none)**
   .GridStyle - CSS inline style to apply to the grid (default is none)**
   .GridAlign - Alignment of grid ("center", "left", "right" - default is none)
   .HeaderClassName - Name of a CSS class to apply to the grid header (default is none)**
   .HeaderStyle - CSS inline style to apply to the grid header (default is none)**
   .ItemClassName - Name of a CSS class to apply to the records/rows (default is none)**
   .ItemStyle - CSS inline style to apply to the records/rows (default is none)**
   .AltItemClassName - Name of a CSS class to apply to every other record/row (default is none)**
   .AltItemStyle - CSS inline style to apply to the every other record/row (default is none)**
   .LinkClassName - Name of a CSS Class to apply to links added by .LinkColumn() (default is none)**
   .LinkStyle - CSS inline style to apply to links added by .LinkColumn() (default is none)**
   .FooterClassName - Name of a CSS class to apply to the grid paging footer (default is none)**
   .FooterStyle - CSS inline style to apply to the grid paging footer (default is none)**
   .ErrorClassName - Name of a CSS Class to apply to an ADO BOF/EOF error. (default is none)**
   .ErrorStyle - CSS inline style to apply to an ADO BOF/EOF error. (default is none)**
   .PagingLinkClass - Name of a CSS Class to apply to Next X/Previous X links (default is none)**
   .ErrorMessage - Message to display for ADO BOF/EOF errors. (default is "No records match your query.")
   .PageResults - Boolean whether to page the results (default is "False")
   .CurrentRecord - Int that represents which record to start from when paging (default is "0")
   .PageSize - Int that represents how many records shown per page when paging (default is "10")

Methods:
   .CreateConnection - Creates a connection. (Args: Connection string)
   .SetTableOptions - Overrides default grid settings. (Args: Width, Padding, Spacing, Border)*
   .BoundColumn - Replaces the db column name w/ one you specify. (Args: DB Field, Header Text)
   .LinkColumn - Renders a field as link. (Args: DB Field, URL, Link Text, Target)
   .Bind - Outputs DataGrid to browser. (Args: None)

* .SetTableOption defaults are "100%" width, cellpadding of 2, cellspacing of 2, border of 1

** You should be using the elements <table>, <td>, <tr>, <a>, etc. to assign styles but there
are plenty occasions where you want different elements styled differently on different areas of
a page. That's when these properties should be used.


---- UPDATED README 2/21/2003 --------------------------------------------------------------

I've optimized the class (shortened it an am freeing up RS object even sooner) and I have also
eliminated the .AutoGenerateCols Property. The property is now set automatically when you call
the .BoundColumn() Method. I've updated the examples to reflect this as well.


---- UPDATED README 12/27/2002 --------------------------------------------------------------

I've added a way to catch and display BOF/EOF errors. I've also added ex_error.asp which shows
an example of the properties being used.

   .ErrorClassName - Name of a CSS Class to apply to an ADO BOF/EOF error. (default is none)
   .ErrorStyle - CSS inline style to apply to an ADO BOF/EOF error. (default is none)
   .ErrorMessage - Message to display for ADO BOF/EOF errors. (default is "No records match your query.")

   Example:
   obj.ErrorStyle = "font-weight: bold;"
   obj.ErrorMessage = "No Soup For You!"


---- UPDATED README 10/28/2002 --------------------------------------------------------------

I've optimized the class by shortening it about 10 lines.

I've also added 2 new files to the zip. sort_clsDataGrid.asp which is another version of
clsDataGrid that allows you to render column headers as "sort by" links. I've also added
sort_ex_paging.asp which shows an example of it being used.

	---- FOLLOWING 4 LINES ONLY RELEVANT TO SORT_CLSDATAGRID.ASP ----
	.BoundColumn() now takes 2 more arguments....
	   - Booloean if the column header should be a "sort by" link
	   - CSS class name for the "sort by" link -- empty string for none
	   ex: obj.BoundColumn("fldName", "Customer Name", True, "clslink")


---- UPDATED README 10/10/2002 --------------------------------------------------------------

I've added a new method:
   .LinkColumn - Renders a field as link. (Args: DB Field, URL, Link Text, Target)

   - DB Field is the name of the field in the query you want linked
   - URL is the url
   - Link Text is the text you want the link to appear as
   - Target is the window you want to target (will not render if left blank)
	
   * In addition, you can use the string "#TEMP# as a place holder in the URL, Link Text
     or Target that will render as the records value. Examples below.

   obj.LinkColumn("fldID", "edit.asp?recid=#TEMP#", "Edit Record #TEMP#", "")
   	- would be sent to the browser as (assuming fldID's value was 10) -
   <a href="edit.asp?recid=10">Edit Record 10</a>

And 2 new properties:
   .LinkClassName - Name of a CSS Class to apply to links added by .LinkColumn() (default is none)
   .LinkStyle - CSS inline style to apply to links added by .LinkColumn() (default is none)

   If I add one of these properties to the example above, like so:
   obj.LinkStyle = "font-weight: bold;"
   obj.LinkColumn("fldID", "edit.asp?recid=#TEMP#", "Edit Record #TEMP#", "_Blank")
   	- this would now be sent to the browser (assuming fldID's value was 10) -
   <a href="edit.asp?recid=10" style="font-weight: bold;" target="_Blank">Edit Record 10</a>

I've also added 2 examples to ex_new.asp which utilizes these new methods and properties.

---- ORIGINAL README 10/9/2002 --------------------------------------------------------------

After playing around with ASP .NET's Data Grid, I figured I'd create something similar for use
with ASP. I've begun by creating the properties and methods to reproduce the most commonly used
and most useful features of ASP .NET's data grid. Some of these include styling the grid, using
an existing connection or creating a new one, bounding columns and paging recordsets. The code
is less than 24 hours old but I plan to add a lot more functionality such as adding events to
elements, enhancing the .BoundColumn method to support formatting, making the grid editable
and basically making it more and more like ASP .NET's datagrid. But I'll also be changing
things along the way to enhance performance and, of course, fixing any bugs that come up. After
it's all said and done I may create a compliled version but I doubt it since I'm just doing
this in my spare time. Plus this is more useful to people working in environments where they
don't have the ability to install custom components.
More info on .NET's grid: http://aspnet.4guysfromrolla.com/articles/040502-1.aspx.

This is provided as is and can be used for anything you want. Personal, commercial, non-profit,
whatever. You can remove the entire header but MUST leave the author line [Author: Nick
DelMedico (www.pixel420.com)] with the class. The examples* provided should be enough to get
you going.

* To run the examples, unzip the file into a virtual directory named whatever you like (ie;
"datagrid_class") and call from your browser like so:

  http://localhost/datagrid_class/ex_paging.asp
  http://localhost/datagrid_class/ex_dbconn_exists.asp
  http://localhost/datagrid_class/ex_new_dbconn.asp

All pages are linked because I'm such a nice guy.

Note: If you have any trouble with the Jet OLEDB provider in the database example then visit
http://www.microsoft.com/data/download.htm.