RepositoryItemCheckEdit.GetValueByState(CheckState) Method
Converts the check state value passed as a parameter to the appropriate edit value.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
state | CheckState | A CheckState enumeration value representing the check state to be converted to the appropriate edited value. |
Returns
Type | Description |
---|---|
Object | A Object expression representing the edited value to be set for a check editor. |
Remarks
The GetValueByState method is used to convert the CheckEdit.CheckState property value passed as the state parameter to a value for the CheckEdit.EditValue property.
The GetValueByState method generates the CheckEdit.QueryValueByCheckState event, which enables you to implement custom conversion logic for selecting an edited value to match the check state. If the QueryCheckStatesEventArgs.Handled property remains set to false (the default behavior) in an event handler, the predefined logic is used. In this case, the GetValueByState method returns a value from one of the RepositoryItemCheckEdit.ValueChecked, RepositoryItemCheckEdit.ValueUnchecked and RepositoryItemCheckEdit.ValueGrayed properties, as appropriate.
Since the GetValueByState method is intended for internal use, you may never need to call this method directly in your applications.