Hide Controls

Hide Table Control when Empty

Description
This customization helps to hide/show the table in the page of your application when the number of matching records for a search is zero/non-zero.
Variables
TableControl
Select a table control
Applies to
TableControl class
Code
 
''' 
''' Override the LoadData and set the visibility of the table
''' 
Public Overrides Sub LoadData()
  
    ' Call the MyBase LoadData()
    MyBase.LoadData()
    
    ' If totalrecords is > 0 set the visibility of the table    
    Me.Visible = (Me.TotalRecords > 0)	
End Sub

     

Terms of Service Privacy Statement