Dear ABMaterial expert,
I use ABMTable and ABMATERIAL ver. 4.30 to create and populate some records. and it works nicely when i click column to sort, either ASC or DESC.
But today when i upgraded to 4.51, the sort order doesnt work anymore.
Please Help
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			I use ABMTable and ABMATERIAL ver. 4.30 to create and populate some records. and it works nicely when i click column to sort, either ASC or DESC.
But today when i upgraded to 4.51, the sort order doesnt work anymore.
Please Help
			
				B4X:
			
		
		
		public Sub ConnectPage()
    ABMShared.BuildPageHeader(page,"Acoount")
    '============================SEARCHING SECTION================================
    Dim searchEntry As ABMInput
    searchEntry.Initialize(page, "searchEntry", ABM.INPUT_TEXT, "Profit Centre", False, "lightblue")
    searchEntry.RaiseChangedEvent = True
    searchEntry.RaiseFocusEvent = True
    page.CellR(0,2).AddComponent(searchEntry)   
    
    Dim btnSearch As ABMButton
    btnSearch.InitializeFloating(page, "btnSearch", "mdi-action-search", "")
    page.CellR(0,3).AddComponent(btnSearch)
    '============================PAGINATION SECTION==============================
    
    Dim pagination As ABMPagination
    pagination.Initialize(page, "pagination", 5, True, True, "")
    pagination.SetTotalNumberOfPages(0)
    page.Cell(1,1).AddComponent(pagination)
    '=============================TABLE SECTION===============================
    Dim tbFolder As ABMTable
    tbFolder.Initialize(page, "tbFolder",  True,  True, True, "tbltheme")
    tbFolder.SetHeaders( Array As String ("key", "Description", "Tax", "Service" ,"Formula", "Detail"))
    tbFolder.SetHeaderThemes(    Array As String ("bgc", "bgl", "bgr", "bgr", "bgc", "bgc"   ))
    tbFolder.SetColumnVisible(   Array As Boolean(False, True, True, True, True, True  ))
    tbFolder.SetColumnDataFields(Array As String ("key", "col1", "col2", "col3" ,"col4", "col5"))
        
    tbFolder.IsResponsive = True
    tbFolder.IsBordered = True
    tbFolder.SetFooter("Total Records: 0", 12,"bg")
    
    page.Cell(2,1).AddComponent(tbFolder)
    
    '=============================ADD BUTTON==================================
    Dim AddRecord As ABMActionButton
    AddRecord.Initialize(page, "AddRecord", "mdi-content-add", "bigblue","")
    AddRecord.MainButton.Size = ABM.BUTTONSIZE_LARGE
    page.AddActionButton(AddRecord)
    
    '=============================LOAD TABLE==================================
    LoadTable(1)
    '=========================================================================
    ' refresh the page
    page.Refresh
    
    ' Tell the browser we finished loading
    page.FinishedLoading
    ' restoring the navigation bar position
    page.RestoreNavigationBarPosition
End Sub
Sub tbFolder_SortChanged(DataField As String, Order As String)
  
'    Dim tbFolder As ABMTable = page.Component("tbFolder")
    Log("  datafield  clicked: "&DataField)
    Log(Order)
    ' do what you want with this...
    If DataField = "col1" Then
        cColumnOrder = " Order by description " & Order & " "
    End If
    If DataField = "col2" Then
        cColumnOrder = " Order by tax " & Order & " "
    End If
    If DataField = "col3" Then
        cColumnOrder = " Order by service " & Order & " "
    End If
    
    LoadTable(1)
    
  
End Sub