Existing Connection Example --- DataGrid Connection Examples -- Paging Example -- New Methods/Properties -- Error Properties
"Sort By" example using sort_clsDataGrid.asp
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 ID | Character Name | Book/Show | Date Entered |
1 | John Galt | Atlas Shrugged | 08/10/2002 |
2 | Hank Reardon | Atlas Shrugged | 08/10/2002 |
3 | Eddie Willers | Atlas Shrugged | 08/10/2002 |
4 | Dagny Taggart | Atlas Shrugged | 08/10/2002 |
5 | Ragnar Danneskjold | Atlas Shrugged | 08/10/2002 |
6 | Francisco D'Anconia | Atlas Shrugged | 08/10/2002 |
7 | Midas Mulligan | Atlas Shrugged | 08/10/2002 |
8 | Jerry Seinfeld | Seinfeld | 08/10/2002 |
9 | George Costanza | Seinfeld | 08/10/2002 |
10 | Cosmo Kramer | Seinfeld | 08/10/2002 |
Next 10 » |