Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomDataSource.SetValue(TcxDataRecordHandle,TcxDataItemHandle,Variant) Method

Sets a value in a specific record/item.

#Declaration

Delphi
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