Skip to main content

GridRowCellContextMenuInfo.Cell Property

Provides the CellControl with the information about a target GridControl cell for which the cotext menu is shown.

Namespace: DevExpress.UI.Xaml.Grid

Assembly: DevExpress.UI.Xaml.Grid.v21.2.dll

NuGet Package: DevExpress.Uwp.Controls

Declaration

public CellControl Cell { get; }

Property Value

Type
DevExpress.UI.Xaml.Grid.CellControl

Remarks

You can use the CellControl object to pass information about the target cell to your custom command. This object provides the Column property that returns the column that contains the target cell.

xmlns:dxg="using:DevExpress.UI.Xaml.Grid"
xmlns:dxr="using:DevExpress.UI.Xaml.Ribbon"

<dxg:GridControl ...>
    <dxg:GridControl.RowCellMenu>
        <dxr:ContextToolbarControl Orientation="Vertical">
            <dxr:ContextToolbarGroup>
                <dxr:ContextToolbarButton Content="Hide This Column"
                                            Command="{Binding Grid.DataContext.HideColumnCommand}"
                                            CommandParameter="{Binding Cell.Column}"/>
            </dxr:ContextToolbarGroup>
        </dxr:ContextToolbarControl>
    </dxg:GridControl.RowCellMenu>
</dxg:GridControl>
See Also