canGetRow
Topic group Related topics Example
Event fired when attempting to read a row into the row buffer; return value determines if the row stays in or is filtered out.
Parameters
none
Property of
Rowset
Description
In addition to setting an SQL filter expression in the filter property, you can filter out rows through dBL code with canGetRow. In a canGetRow handler, the rowset acts as if the row is read into the row buffer. You can test the value properties of the field objects, or anything else.
If canGetRow returns true, that row is kept. If it returns false, the row is discarded and the next row is tried.
Note that canGetRow fires before applying the constrain on a detail table linked through masterRowset or masterSource. Therefore, when using this type of link, you cannot check for the existence of detail rows (by checking the detail rowset’s endOfSet property) or get the values of the first matching detail row in the canGetRow event handler. To access the matching rows in the linked table during the canGetRow event, you must manually apply the constrain (using the setRange( ) or requery( ) methods) inside the canGetRow instead of using the built-in properties. Then you are free to access the detail table as usual.