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 objDataGrid1 = New clsDataGrid
Call objDataGrid1.CreateConnection(strConn1)
objDataGrid1.Command = strQuery1
objDataGrid1.Bind()
Set objDataGrid1 = Nothing
testID | testCharacter | testFromWhat | testDate |
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 |
12 | Eric Cartman | South Park | 08/10/2002 |
13 | Kyle Broflovski | South Park | 08/10/2002 |
14 | Stan Marsh | South Park | 08/10/2002 |
15 | Kenny McCormick | South Park | 08/10/2002 |
16 | Scott Tenorman | South Park | 08/10/2002 |
17 | Elaine Benes | Seinfeld | 08/10/2002 |
18 | Kenny Banya | Seinfeld | 08/10/2002 |
19 | Uncle Leo | Seinfeld | 08/10/2002 |
20 | Soup Nazi | Seinfeld | 08/10/2002 |
21 | Priest Maxi | South Park | 08/10/2002 |
22 | J. Peterman | Seinfeld | 08/10/2002 |
23 | Newman | Seinfeld | 08/10/2002 |
Code Used for following DataGrid:
---------------------------------
Set objDataGrid2 = New clsDataGrid
Call objDataGrid2.CreateConnection(strConn2)
objDataGrid2.Command = strQuery2
Call objDataGrid2.SetTableOptions(600, 2, 2, 0)
objDataGrid2.GridAlign = "center"
objDataGrid2.GridStyle = "color: #000000; border-style: solid; border-width: 1px; border-color: #666666;"
objDataGrid2.HeaderStyle = "font-family: tahoma, sans-serif; font-size: 12px; font-weight: bold;"...
objDataGrid2.ItemStyle = "font-family: tahoma, sans-serif; font-size: 12px; background-color: #FFEFAD;"...
Call objDataGrid2.BoundColumn("testCharacter", "Character Name")
Call objDataGrid2.BoundColumn("testFromWhat", "From What")
Call objDataGrid2.BoundColumn("testDate", "Date Added")
objDataGrid2.Bind()
Set objDataGrid2 = Nothing
Character Name | From What | Date Added |
John Galt | Atlas Shrugged | 08/10/2002 |
Hank Reardon | Atlas Shrugged | 08/10/2002 |
Eddie Willers | Atlas Shrugged | 08/10/2002 |
Dagny Taggart | Atlas Shrugged | 08/10/2002 |
Ragnar Danneskjold | Atlas Shrugged | 08/10/2002 |
Francisco D'Anconia | Atlas Shrugged | 08/10/2002 |
Midas Mulligan | Atlas Shrugged | 08/10/2002 |
Jerry Seinfeld | Seinfeld | 08/10/2002 |
George Costanza | Seinfeld | 08/10/2002 |
Cosmo Kramer | Seinfeld | 08/10/2002 |
Eric Cartman | South Park | 08/10/2002 |
Kyle Broflovski | South Park | 08/10/2002 |
Stan Marsh | South Park | 08/10/2002 |
Kenny McCormick | South Park | 08/10/2002 |
Scott Tenorman | South Park | 08/10/2002 |
Elaine Benes | Seinfeld | 08/10/2002 |
Kenny Banya | Seinfeld | 08/10/2002 |
Uncle Leo | Seinfeld | 08/10/2002 |
Soup Nazi | Seinfeld | 08/10/2002 |
Priest Maxi | South Park | 08/10/2002 |
J. Peterman | Seinfeld | 08/10/2002 |
Newman | Seinfeld | 08/10/2002 |