SBM JavaScript Library Guide → Advanced Functions → Pre-Selecting Rows in a REST Grid Widget
The SelectRowsByData function in the REST Grid widget can be used to select rows in the grid by referring to data in the row to select. This topic describes the function and provides example JavaScript code.
Name | Type | Description |
---|---|---|
columnName | String | The
name of the column to search for the values supplied in the
values parameter.
Note: This should be a fully-qualified column name, from the root
element down.
|
values | String | The values of the given column that correspond to the rows to select. |
fireEvent | Boolean | Whether to fire a selection event when the rows are selected. The default value is false. |
This example refers to the Yahoo geocode REST service referenced in Querying REST Service Results. The following code uses the GetWidget Method method. It will select the rows in the grid that correspond to the given values for the "ResultSet.Results.line2" column.
var grid = GetWidget( "RESTGridWidget" );
grid.SelectRowsByData( "ResultSet.Results.line2", ["Springfield, CO",
→"Springfield, ID"], true );
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.