A newer version of this page is available. Switch to the current version.

GridViewBase.BeginSelection() Method

Obsolete. Prevents selection updates until the GridViewBase.EndSelection method is called.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.dll


[Obsolete("Use the DataControlBase.BeginSelection method instead")]
public void BeginSelection()
<Obsolete("Use the DataControlBase.BeginSelection method instead")>
Public Sub BeginSelection


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 GridViewBase.BeginSelection and GridViewBase.EndSelection methods. This improves performance, and avoids unnecessary rendering operations.


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" 
        Title="Window1" Height="293" Width="494">
        <dxg:GridControl Name="grid" AutoGenerateColumns="AddNew" SelectionMode="Row" Height="220">
                <dxg:TableView Name="tableView" AutoWidth="True" />
        <Button Content="Select" Width="50" Height="30" Margin="5" 
                HorizontalAlignment="Left" Click="Button_Click" />
See Also