How to: Handle Row Double Clicks

  • 4 minutes to read

This example shows how to identify whether a group or data row has been double-clicked by end-user.

<Window x:Class="DXGrid_RowDoubleClick.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

    <Grid>
        <dxg:GridControl Name="grid" Control.MouseDoubleClick="grid_MouseDoubleClick">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="ProductName">
                    <dxg:GridColumn.EditSettings>
                        <dxe:TextEditSettings HorizontalContentAlignment="Center" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
                <dxg:GridColumn FieldName="UnitPrice">
                    <dxg:GridColumn.EditSettings>
                        <dxe:SpinEditSettings HorizontalContentAlignment="Left" />
                    </dxg:GridColumn.EditSettings>
                </dxg:GridColumn>
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TableView Name="tView" />
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>