Interface IGridPattern
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.
Namespace: HP.LFT.SDK.UIAPro
Assembly: HP.LFT.SDK.dll
Syntax
public interface IGridPattern
Properties
ColumnCount
The number of columns in the grid.
Declaration
int ColumnCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
RowCount
The number of rows in the grid.
Declaration
int RowCount { get; }
Property Value
| Type | Description |
|---|---|
| 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.
Declaration
void ActivateCell(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
AddCellToSelection(int, int)
Selects a cell in addition to previously selected cells.
Declaration
void AddCellToSelection(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
AddRowToSelection(int)
Selects a row in addition to previously selected rows.
Declaration
void AddRowToSelection(int row)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The row to select. |
ClickCell(int, int, MouseButton)
Clicks the specified cell in the grid.
Declaration
void ClickCell(int row, int column, MouseButton button = MouseButton.Left)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
| MouseButton | button | 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 Beta UIA Pro Add-in. In the legacy UIA Pro Add-in, use ActivateCell(int, int).
Declaration
void DoubleClickCell(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index |
| int | column | 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.
Declaration
[Obsolete]
object GetCell(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
Returns
| Type | Description |
|---|---|
| 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.
Declaration
IUiObject GetCellAsUIObject(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
Returns
| Type | Description |
|---|---|
| IUiObject |
GetCellName(int, int)
Returns the value of the name property for the specified cell.
Declaration
string GetCellName(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
Returns
| Type | Description |
|---|---|
| string |
GetCellText(int, int)
Returns the text provided by the cell's ITextPattern pattern.
Declaration
string GetCellText(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
Returns
| Type | Description |
|---|---|
| string |
GetCellValue(int, int)
Returns the value provided by the cell IValuePattern pattern.
Declaration
string GetCellValue(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
Returns
| Type | Description |
|---|---|
| string |
SelectCell(int, int)
Selects a cell in the grid.
Declaration
void SelectCell(int row, int column)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
SelectRow(int)
Selects a row in the grid.
Declaration
void SelectRow(int row)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The row to select. |
SetCellValue(int, int, string)
Sets the specified cell's value using the IValuePattern pattern.
Declaration
void SetCellValue(int row, int column, string cellValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | row | The cell row index. |
| int | column | The cell column index. |
| string | cellValue | The cell value to set. |