Description
The FindRow
action searches for the specified value within the specified grid column and returns the index of the first row holding that value.
Declaration
TestObj.FindRow(Column, Value)
TestObj | A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section | |||
Column | [in] | Required | Variant | |
Value | [in] | Required | Variant | |
Result | Integer |
Applies To
The method is applied to the following objects:
Android GridView, AngularUI Grid, Borland String Grid and 41 more objects, Borland TDBGrid, Developer Express ExpressQuantumTreeList, Developer Express ExpressVerticalGrid, Developer Express WPF Grid, Developer Express XtraGrid, Developer Express XtraTreeList, Developer Express XtraVerticalGrid, DevExpressQuantumTreeListView, DevExpressXtraGridView, DevExpressXtraTreeListView, DevExpressXtraVerticalGridColumn, Ext JS Grid Panel, Ext JS Tree Panel, ExtJSTreePanelView, Flex DataGrid, Infragistics UltraGrid, Infragistics WebDataGrid, Infragistics XamDataGrid, InfragisticsUltraGridView, InfragisticsWebDataGridView, Java Swing Table, MFC Grid, Microsoft DataGrid, Microsoft DataGridView, Qt TableWidget, Rogue Wave Stingray Objective Grid, Rogue Wave Stingray Objective GridEx, Silverlight Grid, Spark DataGrid, Syncfusion Essential Grid (GridGroupingControl), Syncfusion Grid Controls, SyncfusionEssGridView, Telerik RadGridView for Silverlight, Telerik RadGridView for WinForms, Telerik RadGridView for WPF, TMS TAdvStringGrid, WPF Toolkit DataGrid, XamDataGridView, Xceed Grid, YUI 2 DataTable, YUI 3 DataTable « Collapse the list
View Mode
This method is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.
Parameters
The method has the following parameters:
Column
Specifies the index or caption of the sought-for column.
The index is zero-based and corresponds to the column’s position within the object's internal columns collection rather than the column’s visible position in the object.
The caption can contain asterisk (*) or question mark (?) wildcards or regular expressions. The asterisk corresponds to a string of any length, the question mark corresponds to any single character. To specify more complicated parts of a caption, use regular expressions.
The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting.
Value
Specifies the value to be found in the specified column.
Result Value
The index of the first row that contains the specified value.
Remarks
If the specified value is not found, FindRow
returns -1 and posts an informative message to the test log.
Example
To view an example that demonstrates how to use the FindRow
action, see: