TableView.RowDoubleClickCommand Property
Gets or sets a command executed when a user double-clicks a row.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Property Value
Type | Description |
---|---|
ICommand<RowClickArgs> | A command executed when a user double-clicks a row. |
Remarks
Bind a command to the RowDoubleClickCommand
property to maintain a clean MVVM pattern. The command works like a RowDoubleClick event handler and allows you to process row double-clicks in a View Model.
The Item property returns the item that a user double-clicks.
Example
The following example demonstrates how to process double-clicks in a ViewModel. Create a command and bind it to the RowDoubleClickCommand property:
<dxg:GridControl Name="grid"
SelectionMode="Row"
AutoGenerateColumns="AddNew"
ItemsSource="{Binding Items}">
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" RowDoubleClickCommand="{Binding RowDoubleClickCommand}"/>
</dxg:GridControl.View>
</dxg:GridControl>
using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;
using DevExpress.Mvvm.Xpf;
using DevExpress.Xpf.Core;
// ...
public class MainViewModel : ViewModelBase {
// ...
[Command]
public void RowDoubleClick(RowClickArgs args) {
DXMessageBox.Show("Row double click: " + ((DataItem)args.Item).Name);
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the RowDoubleClickCommand property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.