Skip to main content

TcxCustomCheckGroupProperties.OnEditValueToStates Event

Enables you to manually convert an edit value to a check state.

Declaration

property OnEditValueToStates: TcxValueToCheckStatesEvent read; write;

Remarks

The OnEditValueToStates event fires each time the editor needs to update its check states (for instance, when changing the edit value). You should handle this event if you use a check group control to display data stored in a format that is not supported by the control. For the supported formats list, refer to the EditValueFormat topic.

Note that manual conversion of edit values to check states generally requires a custom conversion of check states to the edit value. Otherwise, the control may not work correctly. Thus, you will need to handle the OnEditValueToStates event in combination with the Properties.OnStatesToEditValue event. There are cases, however, when you don’t need to handle the Properties.OnStatesToEditValue event. For instance, you may want to display a data field’s values using a read-only check group editor.

The event’s Sender parameter specifies the editor whose edit value is converted to its check states. The AValue parameter enables you to determine the new edit value. The corresponding check states should be written to the ACheckStates parameter.

Note

Use the CalculateCheckStatesValue and CalculateCheckStates methods to calculate the editor’s edit value by the items’ check states and vice versa.

See Also