Skip to main content
A newer version of this page is available. .

How to: Focus a Cell with the Specified Value

  • 2 minutes to read

This example shows how to identify a data cell with the specified value and focus it. To do this, click the 'Find Next' button. The search is performed starting from the currently focused row.

<Window x:Class="DXSample_FocusingCells.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="Focusing Cells" Height="300" Width="491">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="32" />
        </Grid.RowDefinitions>
        <dxg:GridControl Margin="5" Name="grid" AutoGenerateColumns="AddNew">
            <dxg:GridControl.View>
                <dxg:TableView x:Name="view" AutoWidth="True" ShowGroupPanel="False" AllowGrouping="False" NavigationStyle="Cell" />
            </dxg:GridControl.View>
        </dxg:GridControl>
        <Button Grid.Row="1" HorizontalAlignment="Left" Margin="2" Click="Button_Click">
            Find Next</Button>
    </Grid>
</Window>