'--- create a table
Dim tblCases As ABMTable
tblCases.IsResponsive = True
tblCases.IsBordered = True
' IMPORTANT: we set usingQueriesToSort = true because we are going to handle the sorting, not the javascript sorting library
' When using Pagination, the sorting library does not know all the data SetColumnDataFields() is used when the
' user clicks on a column head to sort to return in the SortChanged() event and the GetSortColumn() And SetSortColumn() methods.
Dim txt1 As String = ABM.XTR(lang,"","UGRID20","Case ID")
Dim txt2 As String = ABM.XTR(lang,"","UGRID21","Project")
Dim txt3 As String = ABM.XTR(lang,"","UGRID22","Item Type")
Dim txt4 As String = ABM.XTR(lang,"","UGRID23","Title")
Dim txt5 As String = ABM.XTR(lang,"","UGRID24","Priority")
Dim txt6 As String = ABM.XTR(lang,"","UGRID25","Status")
Dim txt7 As String = ABM.XTR(lang,"","UGRID26","Assigned To")
Dim UsingQueriesToSort As Boolean = True
Dim IsSortible As Boolean = True
Dim IsInteractive As Boolean = True
tblCases.Initialize(Page, "tblCases", IsSortible, UsingQueriesToSort, IsInteractive, "tbltheme")
tblCases.SetHeaders( Array As String (txt1 , txt2 , txt3, txt4, txt5, txt6, txt7))
tblCases.SetHeaderThemes( Array As String ("bg" ,"bg" , "bg" ,"bg" , "bg" , "bg" , "bg"))
tblCases.SetHeaderHeights( Array As Int ( 0 , 0 , 0 , 0 , 0 , 0 ,0 ))
tblCases.SetColumnVisible( Array As Boolean(True, True , True , True , True , True ,True))
tblCases.SetColumnSortable( Array As Boolean(True, True , True , True , True , True , True))
tblCases.SetColumnDataFields(Array As String ("case_id", "project", "item_type", "title", "priority", "workflow_step" ,"assigned_to"))
tblCases.SetColumnWidths( Array As Int ( 90 , 180 , 100, 480, 100 , 100 ,110))
tblCases.SetFooter(ABM.XTR(lang,"","UGRID06","Total number of records:") & " 0", 12,"bg")
Page.CellR(1,1).AddComponent(tblCases)
MaxRows = gbl.CalcTableSize(Page,MaxRows) '--- calcs table size
'ABMShared.ConnectFooterFixed(Page) '--- footer on bottom
LoadCases(1)