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

TCustomdxPSExplorerItem.GetUniqueID(TBytes) Method

Enables you to obtain the item’s unique ID.

#Declaration

Delphi
function GetUniqueID(out AnUniqueID: TBytes): Integer; virtual;

#Parameters

Name Type
AnUniqueID TBytes

#Returns

Type
Integer

#Remarks

The GetUniqueID method generates the item’s unique ID and writes it to the ABuffer parameter. This method’s return value is the number of bytes occupied by the written pointer.

As implemented in the TCustomdxPSExplorerItem class, the GetUniqueID method simply returns 0. Descendants override this method to write a proper ID to the parameter passed and return its size. For items in file-based explorers, an item’s unique ID is its fully qualified path. You should pass a pointer of the PShortString type as the parameter in this case. For data-aware explorers, an item’s unique ID is a pointer of a PdxDBBasedExplorerItemUniqueID type, so you need to pass such a pointer as the parameter.

See Also