CGridView:FindRow
The FindRow method returns the row number containing the specified string. By default, the search is performed in the first left heading column at index 0. You can also search another left heading at column index -1, -2, etc., or the grid body starting at column 1.
nRow = CGridView:FindRow( strName )
nRow = CGridView:FindRow( strName, nCol )
Where strName is the string to locate.
Optionally, nCol specifies a different column to search. If this is omitted, only column 0 is searched.
nRow is returned as the index of the row found. On error, -10 is returned, as it is unlikely a grid has more than 10 top rows.
The following script attaches a grid window and finds a named row:
|
-- attaches the top-most grid window from Mira |
|
-- returns the row with side heading "my row title". |
CGridView class, GetRow, GetStr, FindCol
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.