Deprecated
This function is deprecated. While the existing code keeps working, we recommend switching to SQL Views.
Description
The ListGetRowCount event is executed before the List page is processed. Use this function when your database doesn't support the record count.
You need to use this event together with ListFetchArray and ListQuery events. Read about it in the article How to display data returned by stored procedure.
Syntax
public XVar ListGetRowCount(dynamic searchObj, dynamic masterTable, dynamic masterKeysReq, dynamic selectedRecords, dynamic pageObject)
Arguments
searchObj
an instance of the class which performs search.
masterTable
a master table name.
masterKeysReq
an array of keys.
selectedRecords
an array of selected records on the Print page, null on the List page.
pageObject
an object representing the current page. For more information, see RunnerPage class.
Return value
The function returns the number of records or false.
Applies to pages
Examples
1. Return a hardcoded number of records:
return 10;
2. Calculate and return the number of records
return DBLookup("select count(*) from test");
See also:
•How to display data returned by stored procedure