ComponentOne True DataControl 8.0
Filter Event

 

Filter Event

Occurs before filter expressions are evaluated.

Syntax

TData_Filter (Result As Integer)

Remarks

Arguments: Result is a boolean that can be set to False to exclude the current record from the result set.

The Filter event occurs after each record is fetched from the database but before it is tested against any of the TData filter expressions specified at design time. You can use this event to impose complex filter conditions that cannot be specified by filter expressions. See Filters for details.

When this event fires, Result is set to True, indicating that the current record will be included in the result set. Your event handler should examine field values in the Fields collection (returned by the Fields property) to determine whether the record meets your selection criteria. Setting Result to False effectively excludes the record from the Recordset without further evaluation of TData filter expressions.

Notes: You can only exclude records in this event. You cannot explicitly include records that are rejected by the TData filter. At run time, the FilterExpressions property returns the FilterExpressions collection defined at design time.

The Filter event is fired only if the Filtered property of the TData control is True. To enable it, check the box labeled Filtered on the General property page or set the Filtered property in code.

See Also

TData Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback