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

DataControlBase.EndSelection() Method

Enables selection updates after calling the DataControlBase.BeginSelection method, and forces an immediate update.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public void EndSelection()

Remarks

A View allows a sequence of row selection operations to be performed without having the View render itself after each modification. To do this, the code performing sequential changes must be enclosed within calls to the DataControlBase.BeginSelection and EndSelection methods. This improves performance, and avoids unnecessary rendering operations.

Example

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.

View Example: How to select rows that contain the specified value

<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>

The following code snippets (auto-collected from DevExpress Examples) contain references to the EndSelection() method.

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.

See Also