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

TcxDataControllerSearch.LocateNext(Boolean,Boolean,Boolean) Method

Searches the next or previous record containing the text string match previously found by calling the Locate function.

#Declaration

Delphi
function LocateNext(AForward: Boolean; AIsAnywhere: Boolean = False; ASyncSelection: Boolean = True): Boolean; virtual;

#Parameters

Name Type
AForward Boolean
AIsAnywhere Boolean
ASyncSelection Boolean

#Returns

Type
Boolean

#Remarks

Call this function to search the same text string in records that follow or precede the record containing the field with the previously found match. Pass True or False as the AForward parameter to choose the forward or reverse search direction, respectively. The LocateNext function returns True if it finds a match before reaching the last or first record; otherwise, False.

If the text search is successful, the LocateNext function moves focus to the record with the found match and selects it, canceling the current selection. To avoid any selection changes, pass False as the ASyncSelection optional parameter.

Like Locate, the LocateNext function searches only a record with the string that matches the searched string starting from the first character. To search strings containing any matching character sequences, pass True as the optional AIsAnywhere parameter.

See Also