Back to Devexpress

TcxCustomDataSource.GetInfoForCompare(TcxDataRecordHandle,TcxDataItemHandle,PAnsiChar) Method

vcl-cxcustomdata-dot-tcxcustomdatasource-dot-getinfoforcompare-x28-cxcustomdata-dot-tcxdatarecordhandle-cxcustomdata-dot-tcxdataitemhandle-system-dot-pansichar-x29.md

latest2.9 KB
Original Source

TcxCustomDataSource.GetInfoForCompare(TcxDataRecordHandle,TcxDataItemHandle,PAnsiChar) Method

Locates data in memory for a specific record/column.

Declaration

delphi
function GetInfoForCompare(ARecordHandle: TcxDataRecordHandle; AItemHandle: TcxDataItemHandle; var PValueBuffer: PAnsiChar): Boolean; virtual;

Parameters

NameType
ARecordHandleTcxDataRecordHandle
AItemHandleTcxDataItemHandle
PValueBufferPAnsiChar

Returns

Type
Boolean

Remarks

The GetInfoForCompare method allows you to implement a faster comparison operation for values in a custom data source. In this instance, you must also override the IsNativeCompare function which returns True.

The ARecordHandle parameter identifies the record handle (a unique identifier of a record) in the current data source. The AItemHandle parameter determines the item handle (a value that uniquely identifies the column and thus the field from which to return the text to display). See the TcxCustomDataSource class to obtain detailed information on record and item handles.

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

The GetInfoForCompare method returns the pointer in memory at which the value for a specific record/column is located. The comparison procedure determines the type of values to compare by reading the TcxGridColumn.DataBinding.ValueTypeClass property.

The function returns True if the pointer to a specific value is located. Otherwise, it returns False.

See Also

TcxCustomDataSource.GetItemHandle

TcxCustomDataSource.GetRecordHandleByIndex

TcxCustomDataSource.IsNativeCompare

Using provider mode: Base class structure

TcxCustomDataSource Class

TcxCustomDataSource Members

cxCustomData Unit