Back to Devexpress

TcxCustomDataSource.SetValue(TcxDataRecordHandle,TcxDataItemHandle,Variant) Method

vcl-cxcustomdata-dot-tcxcustomdatasource-dot-setvalue-x28-cxcustomdata-dot-tcxdatarecordhandle-cxcustomdata-dot-tcxdataitemhandle-system-dot-variant-x29.md

latest2.2 KB
Original Source

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

NameType
ARecordHandleTcxDataRecordHandle
AItemHandleTcxDataItemHandle
AValueVariant

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

TcxCustomDataController.Values

TcxCustomDataSource.GetValue

TcxCustomDataSource Class

TcxCustomDataSource Members

cxCustomData Unit