Table of Contents

Interface IGridPattern

Namespace
HP.LFT.SDK.UIAPro
Assembly
HP.LFT.SDK.dll

The methods and properties used to interact with a grid control; a container control that can be traversed by row and column. The children of this element support the IGridItemPattern pattern.

public interface IGridPattern

Properties

ColumnCount

The number of columns in the grid.

int ColumnCount { get; }

Property Value

int

RowCount

The number of rows in the grid.

int RowCount { get; }

Property Value

int

Methods

ActivateCell(int, int)

Activates (double-clicks) the specified cell in the grid. Note: In the default UIA Pro Add-in, this method is supported for backward compatibility only. Use DoubleClickCell(int, int) instead.

void ActivateCell(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

AddCellToSelection(int, int)

Selects a cell in addition to previously selected cells.

void AddCellToSelection(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

AddRowToSelection(int)

Selects a row in addition to previously selected rows.

void AddRowToSelection(int row)

Parameters

row int

The row to select.

ClickCell(int, int, MouseButton)

Clicks the specified cell in the grid.

void ClickCell(int row, int column, MouseButton button = MouseButton.Left)

Parameters

row int

The cell row index.

column int

The cell column index.

button MouseButton

The mouse button used to perform the cell click.

DoubleClickCell(int, int)

Activates (double-clicks) the specified cell in the grid. Note: Supported when using the enhanced UIA Pro Add-in. In the legacy UIA Pro Add-in, use ActivateCell(int, int).

void DoubleClickCell(int row, int column)

Parameters

row int

The cell row index

column int

The cell column index

GetCell(int, int)

Retrieves a UIAPro object representing an item in the grid. Note: This method is only supported when you enable the legacy UIA Pro Add-in.

[Obsolete("Use GetCellAsUIObject(int, int) instead.")]
object GetCell(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

Returns

object

GetCellAsUIObject(int, int)

Retrieves a UIAPro object representing an item in the grid. Note: This method is not supported when you enable the legacy UIA Pro Add-in.

IUiObject GetCellAsUIObject(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

Returns

IUiObject

GetCellName(int, int)

Returns the value of the name property for the specified cell.

string GetCellName(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

Returns

string

GetCellText(int, int)

Returns the text provided by the cell's ITextPattern pattern.

string GetCellText(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

Returns

string

GetCellValue(int, int)

Returns the value provided by the cell IValuePattern pattern.

string GetCellValue(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

Returns

string

SelectCell(int, int)

Selects a cell in the grid.

void SelectCell(int row, int column)

Parameters

row int

The cell row index.

column int

The cell column index.

SelectRow(int)

Selects a row in the grid.

void SelectRow(int row)

Parameters

row int

The row to select.

SetCellValue(int, int, string)

Sets the specified cell's value using the IValuePattern pattern.

void SetCellValue(int row, int column, string cellValue)

Parameters

row int

The cell row index.

column int

The cell column index.

cellValue string

The cell value to set.