Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Common Selection Features

  • 2 minutes to read

#Selection Rectangle

The selection rectangle allows end users to drag the mouse pointer over rows, cells, or cards to select a range of items.

Marquee Selection

To use this behavior, check that the DataControlBase.SelectionMode and DataViewBase.NavigationStyle properties are set to Row or Cell.

To enable the selection rectangle, set the DataViewBase.ShowSelectionRectangle property to true.

You cannot use the selection rectangle when:

To modify the appearance of the selection rectangle, use the DataViewBase.SelectionRectangleStyle property:

<dxg:TableView.SelectionRectangleStyle>
    <Style TargetType="Border">
        <Setter Property="Opacity" Value="0.37" />
        <Setter Property="Background" Value="Green" />
    </Style>
</dxg:TableView.SelectionRectangleStyle>

#Selector Column

The GridControl allows end users to select rows with the Selector Column (the “Web Style Row Selection” mode).

selector column

You can use this behavior if the DataControlBase.SelectionMode property is not set to None.

To show a Selector Column, set the TableView.ShowCheckBoxSelectorColumn property to true.

The TableView.RetainSelectionOnClickOutsideCheckBoxSelector property specifies whether users can select rows only in the Selector Column.

The Selector Column’s FieldName is set to the CheckBoxSelectorColumnName field value. You can use this field to access the Selector Column in code.

Note

#Row and Cell Hover Effects

Set the TableView.HighlightItemOnHover / TreeListView.HighlightItemOnHover property to true to enable hover effects:

#Selection Fade

The GridControl fades selected rows when it loses focus.

To disable this behavior, set the DataViewBase.FadeSelectionOnLostFocus to false. This property does not affect the GridControl when it is in the multiple cell selection mode.

See Also