GridRowCellContextMenuInfo.Row Property
Provides the RowControl with the information about a target GridControl row 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
Property Value
Type |
---|
DevExpress.UI.Xaml.Grid.RowControl |
Remarks
The RowControl object provides the Row property that returns the row for which the context menu is shown. You can use this property in your context menu items to pass a target data row to a custom command. The XAML snippet below illustrates this approach:
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="Duplicate"
Command="{Binding Grid.DataContext.DuplicateCommand}"
CommandParameter="{Binding Row.Row}"/>
<dxr:ContextToolbarButton Content="Delete"
Command="{Binding Grid.DataContext.DeleteCommand}"
CommandParameter="{Binding Row.Row}"/>
</dxr:ContextToolbarGroup>
</dxr:ContextToolbarControl>
</dxg:GridControl.RowCellMenu>
</dxg:GridControl>
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-implement-the-context-menu-for-gridcontrol-rows-and-cells
See Also