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

"Sort By" example using sort_clsDataGrid.asp

Example using exisiting connection (CSS classes used for styles, paging used, autogeneratecols is false so we can add custom column headers). View source to see the style sheet. Inline styles can also be used.:

Code Used for following DataGrid:
---------------------------------
Set objDataGrid = New clsDataGrid
Set objDataGrid.Connection = objConn
objDataGrid.Command = strQuery
objDataGrid.PageResults = True
objDataGrid.PageSize = 10
objDataGrid.CurrentRecord = intBegRec
Call objDataGrid.SetTableOptions("100%", 2, 2, 0)
objDataGrid.GridClassName = "clsgrid"
objDataGrid.HeaderClassName = "clsheader"
objDataGrid.ItemClassName = "clsitem"
objDataGrid.AltItemClassName = "clsitemalt"
objDataGrid.FooterClassName = "clsfooter"
objDataGrid.PagingLinkClass = "clslink"
Call objDataGrid.BoundColumn("testID", "Character ID")
Call objDataGrid.BoundColumn("testCharacter", "Character Name")
Call objDataGrid.BoundColumn("testFromWhat", "Book/Show")
Call objDataGrid.BoundColumn("testDate", "Date Entered")
objDataGrid.Bind()
Set objDataGrid = Nothing

Character IDCharacter NameBook/ShowDate Entered
1John GaltAtlas Shrugged08/10/2002
2Hank ReardonAtlas Shrugged08/10/2002
3Eddie WillersAtlas Shrugged08/10/2002
4Dagny TaggartAtlas Shrugged08/10/2002
5Ragnar DanneskjoldAtlas Shrugged08/10/2002
6Francisco D'AnconiaAtlas Shrugged08/10/2002
7Midas MulliganAtlas Shrugged08/10/2002
8Jerry SeinfeldSeinfeld08/10/2002
9George CostanzaSeinfeld08/10/2002
10Cosmo KramerSeinfeld08/10/2002
    Next 10 »