Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface Grid

- All Superinterfaces:
    Element, LocationInfoProvider, SupportsNativeObject, TableBase<GridCell>, TestObject, TestObjectDescriber, WaitUntilEnabledProvider, EnabledProvider

      public interface Grid
      extends TableBase<GridCell>

  A grid control in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateColumn(int columnIndex)` Double-clicks the specified column in the grid.
    `void` | `activateColumn(java.lang.String column)` Double-clicks the specified column in the grid.
    `void` | `activateRow(int rowIndex)` Double-clicks the specified row in a grid.
    `void` | `clearSelection()` Clears any selected rows or columns in the grid.
    `TableRow<GridCell>` | `getFirstVisibleRow()` Returns the first row visible in a scrolled area.
    `GridSelectionMode` | `getSelectionMode()` Returns the possible selections in the grid.
    `void` | `pressEnter()` Presses the ENTER key when the grid is in focus.
    `void` | `selectMenuItemById(java.lang.String menuItemId)` Selects the specified menu item from a context menu.

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.TableBase

      `activateCell, activateCell, deselectColumn, deselectColumn, deselectRow, deselectRowRange, findAllRowsWithCellTextInColumn, findAllRowsWithCellTextInColumn, findRowWithCellTextInColumn, findRowWithCellTextInColumn, findRowWithCellTextInColumn, findRowWithCellTextInColumn, getRows, getTitle, isEnabled, selectCell, selectCell, selectColumn, selectColumn, selectRow, selectRowRange`

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.Element

      `getId, getName, getType`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObject

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

    - ### Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider

      `getAbsoluteLocation, getLocation, getSize`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject

      `getNativeObject`

    - ### Methods inherited from interface com.hp.lft.sdk.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

    - ### Methods inherited from interface com.hp.lft.sdk.EnabledProvider

      `isEnabled`

- - ### Method Detail

    - #### getFirstVisibleRow

                                                      TableRow<GridCell> getFirstVisibleRow()
                                         throws GeneralLeanFtException

      Returns the first row visible in a scrolled area.
      Returns:
        the first row visible in a scrolled area.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getSelectionMode

                                                      GridSelectionMode getSelectionMode()
                                      throws GeneralLeanFtException

      Returns the possible selections in the grid.
      Returns:
        the possible selections.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateColumn

          void activateColumn(java.lang.String column)
                       throws GeneralLeanFtException

      Double-clicks the specified column in the grid. Double-clicking the column selects the entire column, displays another window, or performs another application-specific action.
      Parameters:
        `column` - the name of the column.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateColumn

          void activateColumn(int columnIndex)
                       throws GeneralLeanFtException

      Double-clicks the specified column in the grid. Double-clicking the column selects the entire column, displays another window, or performs another application-specific action.
      Parameters:
        `columnIndex` - 1-based.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activateRow

          void activateRow(int rowIndex)
                    throws GeneralLeanFtException

      Double-clicks the specified row in a grid.
      Parameters:
        `rowIndex` - 1-based.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### clearSelection

          void clearSelection()
                       throws GeneralLeanFtException

      Clears any selected rows or columns in the grid.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### pressEnter

          void pressEnter()
                   throws GeneralLeanFtException

      Presses the ENTER key when the grid is in focus.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectMenuItemById

          void selectMenuItemById(java.lang.String menuItemId)
                           throws GeneralLeanFtException

      Selects the specified menu item from a context menu. A context menu is opened by right-clicking the grid. Use `selectColumn`, `selectRow`, or `selectCell` to open the context menu before invoking this method.
      Parameters:
        `menuItemId` - The SAP ID for the menu item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.