Skip to main content
All docs
V25.2
  • CellAutomationEventArgs.Cell Property

    Gets the target cell.

    Namespace: DevExpress.Xpf.Grid.Automation

    Assembly: DevExpress.Xpf.Grid.v25.2.dll

    Declaration

    public CellValue Cell { get; }

    Property Value

    Type Description
    CellValue

    The target cell.

    Remarks

    Use the Value property to read the target cell value.

    The following code example handles the AutomationRequested event and changes values announced by a screen reader app when the target cell is focused:

    <dxg:GridControl ItemsSource="{Binding Items}">
        <dxg:GridControl.View>
            <dxg:TableView
                x:Name="tableView"
                NavigationStyle="Row"
                dxg:GridAutomationHelper.AutomationRequested="OnAutomationRequested"/>
        </dxg:GridControl.View>
    </dxg:GridControl>
    
    using DevExpress.Xpf.Grid;
    using DevExpress.Xpf.Grid.Automation;
    
    void OnAutomationRequested(object sender, AutomationEventArgs e) {
        if (e is CellAutomationEventArgs cellArgs) {
            // "<Header> <Value>" — for example: "Unit Price 12.30"
            var header = cellArgs.Column.HeaderCaption ?? cellArgs.Column.FieldName;
            var valueText = cellArgs.Cell.Value?.ToString() ?? string.Empty;
    
            e.AutomationValue = $"{header} {valueText}";
        }
    }
    
    See Also