XRCheckBox.CheckState Property

Bindable. Gets or sets the current state of the XRCheckBox object.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v18.2.dll


public CheckState CheckState { get; set; }
Public Property CheckState As CheckState

Property Value

Type Default Description


A CheckState enumeration value which determines the state of a checkbox.


If this property is set to the Checked value the check box displays a check mark.

If this property is set to the Unchecked value the check box is empty.

If this property is set to the Indeterminate value and the XRCheckBox.Checked property is set to true the check box displays a shaded check mark.


The following code creates an XRCheckBox object, and sets some of its properties.

using DevExpress.XtraReports.UI;
// ...

public XRCheckBox CreateXRCheckBox()
    // Create an XRCheckBox object.
    XRCheckBox xrCheckBox1 = new XRCheckBox();

    // Bind the CheckState property to the UnitsInStock data field.
    // Change the control's text depending on the UnitsInStock data field value.
    xrCheckBox1.ExpressionBindings.AddRange(new ExpressionBinding[] {
    new ExpressionBinding("BeforePrint", "CheckState", "Iif([UnitsInStock]>=1,\'Checked\', \'Unchecked\')"),
    new ExpressionBinding("BeforePrint", "Text", 
                          "Iif([UnitsInStock]>0,\'Units in Stock: \' + [UnitsInStock], \'None\')")});

    // Set the control's size.
    xrCheckBox1.SizeF = new SizeF(150F, 20F);

    return xrCheckBox1;
See Also