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

GridOptionsSelection.ShowCheckBoxSelectorInColumnHeader Property

Gets or sets whether a check box is displayed in the check box column header allowing end-users to select/deselect all grid rows.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Grid

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean ShowCheckBoxSelectorInColumnHeader { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

True or Default, to show a check box is the check box column header; otherwise, False.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Property Paths

You can access this nested property as listed below:

Object Type Path to ShowCheckBoxSelectorInColumnHeader
GridView
.OptionsSelection .ShowCheckBoxSelectorInColumnHeader

Remarks

The check box column displays a check box in its header by default. The check box allows end-users to select/unselect all rows.

GridView_OptionsSelection_ShowCheckBoxSelectorInColumnHeader_True

Set the ShowCheckBoxSelectorInColumnHeader property to False to hide the check box. If the check box is hidden, the default caption (“Selection“) is displayed instead.

GridView_OptionsSelection_ShowCheckBoxSelectorInColumnHeader_False

The code snippet below shows how to change the default caption using the localization mechanism.

public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
            GridLocalizer.Active = new CustomGridLocalizer();
        }
    }
public class CustomGridLocalizer : GridLocalizer {
        public override string GetLocalizedString(GridStringId id) {
            if(id == GridStringId.CheckboxSelectorColumnCaption) {
                return "CustomCaption";
            }
            return base.GetLocalizedString(id);
        }
}

You can also show/hide check boxes in group rows by using the GridOptionsSelection.ShowCheckBoxSelectorInGroupRow property.

See Also