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(strConn2)
objDataGrid1.Command = strQuery1
Call objDataGrid1.SetTableOptions(640, 2, 2, 0)
objDataGrid1.GridAlign = "center"
objDataGrid1.GridStyle = "color: #000000; border-style: solid; border-width: 1px; border-color: #666666;"
objDataGrid1.HeaderStyle = "font-family: tahoma, sans-serif; font-size: 12px; font-weight: bold;"...
objDataGrid1.ItemStyle = "font-family: tahoma, sans-serif; font-size: 12px; background-color: #FFEFAD;"...
Call objDataGrid1.BoundColumn("testCharacter", "Character Name")
Call objDataGrid1.BoundColumn("testFromWhat", "From What")
Call objDataGrid1.BoundColumn("testDate", "Date Added")
Call objDataGrid1.LinkColumn("testID", "http://www.google.com/search?q=#TEMP#", "Click Me", "_Blank")
objDataGrid1.Bind()
Set objDataGrid1 = Nothing
testID | Character Name | From What | Date Added |
Click Me | Jerry Seinfeld | Seinfeld | 08/10/2002 |
Click Me | George Costanza | Seinfeld | 08/10/2002 |
Click Me | Cosmo Kramer | Seinfeld | 08/10/2002 |
Click Me | Elaine Benes | Seinfeld | 08/10/2002 |
Click Me | Kenny Banya | Seinfeld | 08/10/2002 |
Click Me | Uncle Leo | Seinfeld | 08/10/2002 |
Click Me | Soup Nazi | Seinfeld | 08/10/2002 |
Click Me | J. Peterman | Seinfeld | 08/10/2002 |
Click Me | Newman | Seinfeld | 08/10/2002 |
Code Used for following DataGrid:
---------------------------------
Set objDataGrid2 = New clsDataGrid
Call objDataGrid2.CreateConnection(strConn1)
objDataGrid2.Command = strQuery
objDataGrid2.PageResults = True
objDataGrid2.PageSize = 10
objDataGrid2.CurrentRecord = intBegRec
Call objDataGrid2.SetTableOptions("100%", 2, 2, 0)
objDataGrid2.GridClassName = "clsgrid"
objDataGrid2.HeaderClassName = "clsheader"
objDataGrid2.ItemClassName = "clsitem"
objDataGrid2.AltItemClassName = "clsitemalt"
objDataGrid2.FooterClassName = "clsfooter"
objDataGrid2.LinkClassName = "clslink2"
objDataGrid2.PagingLinkClass = "clslink"
Call objDataGrid2.BoundColumn("testID", "Character ID")
Call objDataGrid2.BoundColumn("testCharacter", "Character Name")
Call objDataGrid2.BoundColumn("testFromWhat", "Book/Show")
Call objDataGrid2.BoundColumn("testDate", "Date Entered")
Call objDataGrid2.LinkColumn("testID", "javascript:alert('Record ID is #TEMP#!');", "Click Me", "")
Call objDataGrid2.LinkColumn("testFromWhat", "http://www.google.com/search?q=#TEMP#", "#TEMP#", "_Blank")
objDataGrid2.Bind()
Set objDataGrid2 = Nothing
Character ID | Character Name | Book/Show | Date Entered |
Click Me | John Galt | Atlas Shrugged | 08/10/2002 |
Click Me | Hank Reardon | Atlas Shrugged | 08/10/2002 |
Click Me | Eddie Willers | Atlas Shrugged | 08/10/2002 |
Click Me | Dagny Taggart | Atlas Shrugged | 08/10/2002 |
Click Me | Ragnar Danneskjold | Atlas Shrugged | 08/10/2002 |
Click Me | Francisco D'Anconia | Atlas Shrugged | 08/10/2002 |
Click Me | Midas Mulligan | Atlas Shrugged | 08/10/2002 |
Click Me | Jerry Seinfeld | Seinfeld | 08/10/2002 |
Click Me | George Costanza | Seinfeld | 08/10/2002 |
Click Me | Cosmo Kramer | Seinfeld | 08/10/2002 |
Next 10 » |