How to: Select Rows that Contain The Specified Value

  • 5 minutes to read

This example shows how to select rows whose UnitPrice column contains a value equal to or greater than 20. To select rows, click the Select button.

<Window x:Class="DXGrid_SelectRows.Window1" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" 
        Title="Window1" Height="293" Width="494">
    <StackPanel>
        <dxg:GridControl Name="grid" AutoGenerateColumns="AddNew" SelectionMode="Row" Height="220">
            <dxg:GridControl.View>
                <dxg:TableView Name="tableView" AutoWidth="True" />
            </dxg:GridControl.View>
        </dxg:GridControl>
        <Button Content="Select" Width="50" Height="30" Margin="5" 
                HorizontalAlignment="Left" Click="Button_Click" />
    </StackPanel>
</Window>