TcxCustomDataController.SetEditValue(Integer,Variant,TcxDataEditValueSource) Method
Sets the value of a specific item in the record currently being edited.
Declaration
function SetEditValue(AItemIndex: Integer; const AValue: Variant; AEditValueSource: TcxDataEditValueSource): Boolean; virtual;
Parameters
Name | Type |
---|---|
AItemIndex | Integer |
AValue | Variant |
AEditValueSource | TcxDataEditValueSource |
Returns
Type |
---|
Boolean |
Remarks
Use the SetEditValue method to change dataset values programmatically.
The AItemIndex parameter specifies the record’s field whose value will be changed. The field is specified by the index of the corresponding item (a Table View column, a card row, etc).
The field’s value to be assigned should be passed as the Value parameter.
The edit value’s type should be passed as the AEditValueSource parameter.
Value | Meaning |
---|---|
evsValue | AValue the value to set the specified item to (used for binary data editing controls). |
evsText | AValue represents the text representation of the specified item’s value (used for text editing controls). |
evsKey | AValue represents the key field value of the specified item in the lookup data source (used for lookup controls). |
The SetEditValue function returns True if the item’s value was set successfully. Otherwise, False is returned.
Note
Do not call the SetEditValue method within the BeginUpdate/EndUpdate and BeginFullUpdate/EndFullUpdate blocks.
See Also