Library Vcl NextSuite 6 NextGrid6 Reference Classes TNxCustomGrid6 FindText

FindText

Get index of a first row matching Text string, starting from StartRow.

pas
function FindText(Cols: array of Integer; Text: WideString; StartRow, EndRow: Integer; Options: TNxSearchOptions; MatchingOptions: TNxSearchMatchingOptions = moContain): Integer;

Parameters

Cols
Array of column indexes to be included in the search.

Text
A text to be found.

StartRow
Index of the starting row. Usually this should be 0.

EndRow
Index of the last row.

Options
Set of flags.

MatchingOptions
Set of flags.

Example

pas
var FoundRowIndex := NextGrid61.FindText([0, 5], 'extra', 0, NextGrid61.RowCount - 1, [soCaseSensitive], moBeginWith);

After the method is called, found row index is stored into LastFoundRow property.

Sign in