A newer version of this page is available. Switch to the current version.

CheckEdit.EditValue Property

Gets or sets the editor's edit value.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll


public override object EditValue { get; set; }

Property Value

Type Default Description


The editor's edit value.


In the CheckEdit control, each state (checked, unchecked and indeterminate) corresponds to a certain value. The default "state - value" pairs are:

  • Checked state corresponds to the true Boolean value.
  • Unchecked state corresponds to the false Boolean value.
  • Indeterminate state (see RepositoryItemCheckEdit.AllowGrayed) corresponds to the null value (Nothing in Visual Basic).

When the editor's check state changes, a corresponding value is assigned to the editor's edit value. Conversely, when the editor's edit value is set to one of the three values above, the corresponding check state is enabled. For instance, when you assign false to the EditValue property, the editor switches to the Unchecked state. When a user enables the Checked state, the editor's edit value is set to true.

To associate custom values with the control's check states, see the RepositoryItemCheckEdit.ValueUnchecked, RepositoryItemCheckEdit.ValueChecked and RepositoryItemCheckEdit.ValueGrayed properties. In advanced cases, you can handle the RepositoryItemCheckEdit.QueryCheckStateByValue and RepositoryItemCheckEdit.QueryValueByCheckState events to dynamically convert check states to edit values and back.

The code sample below illustrates how to set the "On" and "Off" values to check edit's states.

checkEdit1.Properties.ValueChecked = "On";
checkEdit1.Properties.ValueUnchecked = "Off";
checkEdit1.CheckedChanged += CheckEdit1_CheckedChanged1;

private void CheckEdit1_CheckedChanged1(object sender, EventArgs e)
    var edit = (CheckEdit)sender;
    XtraMessageBox.Show(string.Format("CheckEdit Value: {0}", edit.EditValue));
See Also