Back to Devexpress

TdxListViewOwnerDataFindEvent Type

vcl-dxlistview-35d04607.md

latest3.1 KB
Original Source

TdxListViewOwnerDataFindEvent Type

The procedural type for list item search handlers.

Declaration

delphi
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

NameTypeDescription
SenderTdxCustomListView

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:

ValueDescription
ifDataThe control searches for an item with the same Data property value as the AFindData parameter.
ifPartialStringThe control searches for the closest partial match of an item’s Caption property value and the AFindString parameter.
ifExactStringThe control searches for an item with the same Caption property value as the AFindString parameter.
ifNearestThe control searches for the nearest item.

The ADirection parameter’s options include:

ValueDescription
sdLeftThe control searches for the nearest item to the left of the specified item.
sdRightThe control searches for the nearest item to the right of the specified item.
sdAboveThe control searches for the nearest item above the specified item.
sdBelowThe control searches for the nearest item below the specified item.
sdAllThe 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

dxListView Unit