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

XRCheckBox.CheckState Property

OBSOLETE

This property is now obsolete. Use the CheckBoxState property instead.

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v21.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

[Browsable(false)]
[Obsolete("This property is now obsolete. Use the CheckBoxState property instead.")]
public CheckState CheckState { get; set; }

Property Value

Type Default Description
CheckState Unchecked

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

Remarks

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.

Example

The following code sample creates the XRCheckBox control and binds its state to a data field.

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

public XRCheckBox CreateXRCheckBox()
{
    // Creates the XRCheckBox control.
    XRCheckBox xrCheckBox1 = new XRCheckBox();

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

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

    return xrCheckBox1;
}
See Also