IGridProvider::GetItem method

Retrieves the Microsoft UI Automation provider for the specified cell.

Syntax

HRESULT GetItem(
  int                       row,
  int                       column,
  IRawElementProviderSimple **pRetVal
);

Parameters

row

Type: int

The ordinal number of the row of interest.

column

Type: int

The ordinal number of the column of interest.

pRetVal

Type: IRawElementProviderSimple**

Receives a pointer to a UI Automation provider for the specified cell or a null reference (Nothing in Microsoft Visual Basic .NET) if the cell is empty.

Return Value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Grid coordinates are zero-based with the upper left (or upper right cell depending on locale) having coordinates (0,0).

If a cell is empty a UI Automation provider must still be returned in order to support the ContainingGrid property for that cell. This is possible when the layout of child elements in the grid is similar to a ragged array.

Hidden rows and columns, depending on the provider implementation, may be loaded in the UI Automation tree and will therefore be reflected in the IGridProvider::RowCount and IGridProvider::ColumnCount properties. If the hidden rows and columns have not yet been loaded they should not be counted.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)
DLL Uiautomationcore.dll

See Also

IGridProvider

UI Automation Providers Overview