Classic ASP DataGrid Klasse
Ich habe früher eine DataGrid Klasse für Classic ASP geschrieben.
Erstens aus Interesse und zweitens weil ich da eine gekapselte, einmalige Lösung wollte.
Hiermit stelle ich das (Meine Jugendsünde) hier zur Verfügung, da scheinbar noch mehr Classic ASP nutzen, als ich angenommen hatte :-)
Download:
Beispiel Anwendung:
Set objDataGrid = New DataGrid
With objDataGrid
.SqlString = strsql
.Connection = Conn
.DefaultSorting = "art_date_time;desc"
.Sorting = True
.Homepath = iif(nur_eigene, "?action=show_cat&ownid=" & ownId, "?action=show_cat&id=" & strid)
.TableProperties = "class=""datatable"" width=""99%"" cellspacing=""1"" cellpadding=""2"""
.Style1 = "class=""datatable_white"""
.Style2 = "class=""datatable_green"""
End With
Set objDataGridColumn = New DataGridColumn
With objDataGridColumn
.Name = "art_name"
.Caption = "Titel"
.CustomCode = """<a href=""""?action=show_article&catid={cat_id}&id={art_id}"""">{art_name}</a> "" & getNewArticle(""{art_date_time}"")"
End With
objDataGrid.AddColumn(objDataGridColumn)
Set objDataGridColumn = New DataGridColumn
With objDataGridColumn
.Name = "art_date_time"
.Caption = "Datum"
.CustomCode = "Left(""{art_date_time}"", 10)"
.Properties = "align=""center"""
End With
objDataGrid.AddColumn(objDataGridColumn)
objDataGrid.Draw()
set objDataGridColumn=nothing
set objDataGrid=nothing
Viel Spass!