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

RepositoryItemCheckEdit.ValueChecked Property

Gets or sets a value that corresponds to the checked state.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(true)]
public object ValueChecked { get; set; }

Property Value

Type Default Description
Object

true

The value associated with the checked state.

Remarks

The ValueChecked, RepositoryItemCheckEdit.ValueUnchecked and RepositoryItemCheckEdit.ValueGrayed properties specify the values that correspond to the editor's checked, unchecked and indeterminate state, respectively.

When the editor's check state is toggled by an end-user or in code, a corresponding value (ValueChecked, RepositoryItemCheckEdit.ValueUnchecked or RepositoryItemCheckEdit.ValueGrayed) is assigned to the editor's edit value. Conversely, when the editor's edit value is set to ValueChecked, RepositoryItemCheckEdit.ValueUnchecked or RepositoryItemCheckEdit.ValueGrayed, the corresponding check state is enabled.

The default values of the ValueChecked, RepositoryItemCheckEdit.ValueUnchecked and RepositoryItemCheckEdit.ValueGrayed properties are true, false and null, respectively. You can assign custom values to these properties, when your logic requires.

When the CheckEdit control is in binding mode, ensure that the data types of the ValueChecked, ValueUnchecked and ValueGrayed values match the bound field's type.

In advanced cases, you can dynamically convert from check states to edit values and vice versa by handling the RepositoryItemCheckEdit.QueryCheckStateByValue and RepositoryItemCheckEdit.QueryValueByCheckState events.

Assigning a new value to the ValueChecked property at runtime generates the RepositoryItem.PropertiesChanged event.

See CheckEdit.EditValue to learn more.

See Also