Existing Connection Example --- DataGrid Connection Examples -- Paging Example -- New Methods/Properties -- Error Properties

"Sort By" example using sort_clsDataGrid.asp

This is a duplicate of the example from ex_new_dbconn.asp except the query returns no records and error properties are set. I've shortened some of the styles (end with "...") below so they don't wrap to a new line.

Code Used for following DataGrid:
---------------------------------
Set objDataGrid = New clsDataGrid
Call objDataGrid.CreateConnection(strConn)
objDataGrid.Command = strQuery
Call objDataGrid.SetTableOptions(600, 2, 2, 0)
objDataGrid.ErrorMessage = "No Soup For You!"
objDataGrid.ErrorClassName = "clserror"
objDataGrid.GridAlign = "center"
objDataGrid.GridStyle = "color: #000000; border-style: solid; border-width: 1px; border-color: #666666;"
objDataGrid.HeaderStyle = "font-family: tahoma, sans-serif; font-size: 12px; font-weight: bold;"...
objDataGrid.ItemStyle = "font-family: tahoma, sans-serif; font-size: 12px; background-color: #FFEFAD;"...
Call objDataGrid.BoundColumn("testCharacter", "Character Name")
Call objDataGrid.BoundColumn("testFromWhat", "From What")
Call objDataGrid.BoundColumn("testDate", "Date Added")
objDataGrid.Bind()
Set objDataGrid = Nothing

Character NameFrom WhatDate Added
 
No Soup For You!