Skip to main content

Set Table Cell Value

Sets the value of a grid / table cell at the given row and column (0-based) via the UIA ValuePattern (Windows only). Some grids (e.g. WPF DataGrid) require the cell to be in edit mode first — click or double-click it before setting the value.

Category: Desktop Application Automation · Group: Desktop · Activity name: SetTableCellValue

The SetTableCellValue activity in the designer

Example

SetTableCellValue("<xPath>", 0, tableColumn=0, valueToSet="<valueToSet>", checkOrphanedElements=False)

Inputs

NameTypeRequiredDefaultDescription
XPathstringYesXPath expression that identifies the grid / table element.
Row indexintegerYesZero-based row index of the cell to write.
Column indexintegerYesZero-based column index of the cell to write.
ValuestringYesThe value to write into the cell.
Check orphaned elementsbooleanFalseWhen the element is not found by its XPath, scan the parent window's area for elements detached from the UI Automation tree. Slower; enable only for windows known to orphan their elements.