CheckEdit.EditValue Property
Gets or sets the edit value.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v25.2.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
| Type | Default | Description |
|---|---|---|
| Object | false | The edit value. |
Remarks
CheckEdit maps each check state to a specific edit value:
| Check State | Edit Value |
|---|---|
Checked |
true |
Unchecked |
false |
Indeterminate |
null |
When the check state changes, EditValue is set to the corresponding value.
Custom Edit Value
Use the following properties to map custom values and their text representations to check states:
- CheckEdit.Proeprties.ValueUnchecked / DisplayValueUnchecked
- CheckEdit.Properties.ValueChecked / DisplayValueChecked
- CheckEdit.Properties.ValueGrayed / DisplayValueGrayed
The following code snippet implements the following:
- Maps custom string values to checked and unchecked states
- Displays the edit value when the check state changes
checkEdit1.Properties.ValueChecked = "On";
checkEdit1.Properties.ValueUnchecked = "Off";
checkEdit1.CheckedChanged += CheckEdit1_CheckedChanged;
void CheckEdit1_CheckedChanged(object sender, EventArgs e) {
var editor = (CheckEdit)sender;
XtraMessageBox.Show(string.Format("CheckEdit Value: {0}", editor.EditValue));
}
Tip
For runtime Check State ⇄ Edit Value conversion, handle the following events:
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValue property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.