Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxDataFindCriteria.GetTextStartPositionByRowIndex(Integer,Integer,string) Method

Returns a highlighted text match and its start position in a data item by the specified row and item indexes.

#Declaration

Delphi
function GetTextStartPositionByRowIndex(ARowIndex: Integer; AItemIndex: Integer; out AHighlightedText: string): Integer;

#Parameters

Name Type
ARowIndex Integer
AItemIndex Integer
AHighlightedText string

#Returns

Type
Integer

#Remarks

Call this function to attempt to obtain a highlighted text match from a search result. Use the ARowIndex and AItemIndex parameters to pass the row index of the target record and its data item’s index. The function returns -1 if the specified row does not meet the active filter or search criteria, or the specified data item’s value does not include text that matches an active criterion. Otherwise, the GetTextStartPositionByRowIndex function returns an index of the character that starts a found text match. In this case, you can use the AHighlightedText parameter to retrieve the text match.

Note

A single data item’s value can have only one text match highlight, while a single row can have multiple text match highlights in different data item values. A container control’s dedicated Find Panel setting defines if found text matches are highlighted.

See Also