Skip to main content
A newer version of this page is available. .

TcxCustomDataSource.SetValue(TcxDataRecordHandle,TcxDataItemHandle,Variant) Method

Sets a value in a specific record/item.

Declaration

procedure SetValue(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle; const AValue: Variant); virtual;

Parameters

Name Type
ARecordHandle TcxDataRecordHandle
AItemHandle TcxDataItemHandle
AValue Variant

Remarks

Implement this method to enable a user to modify cell values in provider mode. SetValue is called when you set a value for a specific record/item via the data controller’s Values property.

In a grid control, SetValue is called when the end-user changes a cell value within a grid view. The new value is passed as the AValue parameter.

You should override the SetValue method to insert new data into a specific field of your custom data source.

The record to be modified is specified by the ARecordHandle parameter. It represents the value used to uniquely identify the record among other records. AItemHandle determines the item handle (a value which uniquely identifies the item and thus the field to modify).

Before calling SetValue, the GetRecordHandleByIndex and GetItemHandle methods are invoked. They return the record handle and the item handle respectively to be passed as arguments to the SetValue method.

See Also