Skip to main content

TdxListViewOwnerDataFindEvent Type

The procedural type for list item search handlers.

Declaration

TdxListViewOwnerDataFindEvent = procedure(Sender: TdxCustomListView; AFind: TdxListItemFind; const AFindString: string; const AFindPosition: TPoint; AFindData: TCustomData; AStartIndex: Integer; ADirection: TdxListItemSearchDirection; AWrap: Boolean; var AIndex: Integer) of object;

Parameters

Name Type Description
Sender TdxCustomListView

The List View control that raised the event.

AFind TdxListItemFind
AFindString string

The searched string.

AFindPosition TPoint

The search start position.

AFindData TCustomData

The specific data to be searched.

AStartIndex Integer

The item index from which the search starts.

ADirection TdxListItemSearchDirection
AWrap Boolean

Specifies if the search continues from the start of the List View control if no match is found.

AIndex Integer

The found item’s index. Set this parameter to -1 if the search operation yielded no result.

Remarks

The AFind parameter’s options include:

Value Description
ifData The control searches for an item with the same Data property value as the AFindData parameter.
ifPartialString The control searches for the closest partial match of an item’s Caption property value and the AFindString parameter.
ifExactString The control searches for an item with the same Caption property value as the AFindString parameter.
ifNearest The control searches for the nearest item.

The ADirection parameter’s options include:

Value Description
sdLeft The control searches for the nearest item to the left of the specified item.
sdRight The control searches for the nearest item to the right of the specified item.
sdAbove The control searches for the nearest item above the specified item.
sdBelow The control searches for the nearest item below the specified item.
sdAll The control searches for the nearest item in the order of items in the control’s Items property.

The List View’s OnDataFind event references the TdxListViewOwnerDataFindEvent type.

See Also