Obtains or sets the number of records of a Grid or Freestyle Grid.
Objects: Web Panel
Generators: .NET, .NET Framework, Java
Controls: Free Style Grid, Grid
The RecordCount property returns the number of records of the Grid that meet the selection conditions. It may return -1 if the program could not determine it (it was not assigned and it could not be calculated automatically).
||It could not be determined. Typically, the Grid does not have a base table or the loading conditions are evaluated client side.
||Since the program could not calculate it automatically, you should set its value in the Refresh event.
||Number of records of the Grid base table
This property applies only at runtime.
1) Grid with base table (GridCount could be calculated automatically)
2) Grid is based on SDT (GridCount could be calculated automatically)
&Clients = ClientsGet()
for &Client in &Clients
&Clientid = &Client.ClientId
&ClientName = &Client.ClientName
3) Grid is loaded from external sources (RecordCount could not be calculated automatically)
This case requires that RecordCount is assigned in the Refresh Event. If not, the Pagecount could not be determined when the Web Panel loads.
grid1.Rows = 5
grid1.RecordCount = 12
for &i = 1 to 12
&ClientId = GetClientId(&i)
&ClientName = GetClientName(&i)
Grid paging on the Web
Paging in apps