Back to Devexpress

TableView.ShowCheckBoxSelectorColumn Property

wpf-devexpress-dot-xpf-dot-grid-dot-tableview-2ff311cd.md

latest4.4 KB
Original Source

TableView.ShowCheckBoxSelectorColumn Property

Gets or sets if the check box selector column is visible. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public bool ShowCheckBoxSelectorColumn { get; set; }
vb
Public Property ShowCheckBoxSelectorColumn As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to display the check box selector column; otherwise, false.

|

Remarks

To display the check box selector column, enable the ShowCheckBoxSelectorColumn property and set the DataControlBase.SelectionMode property to Row or MultipleRow.

Use the CheckBoxSelectorColumnPosition property to specify the required check box selector column position.

Example

The following code sample enables the check box selector column:

xaml
<Window
        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"
        x:Class="WpfApp41.MainWindow">
    <Grid>
        <dxg:GridControl ... 
                         SelectionMode="MultipleRow">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="ID"/>
                <dxg:GridColumn FieldName="Name"/>
                <dxg:GridColumn FieldName="LastName"/>
                <dxg:GridColumn FieldName="Address"/>
                <dxg:GridColumn FieldName="PhoneNumber"/>
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TableView 
                                ShowCheckBoxSelectorColumn="True"
                                CheckBoxSelectorColumnPosition="Left"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </Grid>
</Window>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowCheckBoxSelectorColumn property.

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.

wpf-pivot-grid-implement-a-custom-filter-popup/CS/DXPivotGrid_CustomFilterPopup/MainWindow.xaml#L36

xml
RetainSelectionOnClickOutsideCheckBoxSelector="False"
ShowCheckBoxSelectorColumn="True" CheckBoxSelectorColumnWidth="35"
ShowGroupPanel="False" AllowGrouping="False" ShowIndicator="False"

See Also

ShowCheckBoxSelectorInGroupRow

CheckBoxSelectorColumnHeaderTemplate

TableView Class

TableView Members

DevExpress.Xpf.Grid Namespace