Skip to main content

IcxFilterControl.GetItemLink(Integer) Method

Returns the ItemLinks collection item.

Declaration

function GetItemLink(Index: Integer): TObject;

Parameters

Name Type
Index Integer

Returns

Type
TObject

Remarks

This method is designed to be a ‘read’ method of the ItemLinks collection. When implemented, it returns an object representing a link to the specified filter item. Filter items are identified by their zero-based indexes passed via the Index parameter.

For instance, the GetItemLink method implemented by a data-aware filter control returns either a filter item from the Items collection or a field from the bound dataset.

if FItems.Count > 0 then
  Result := FItems[Index]
else
  Result := GetField(Index);

A grid Table View implements the GetItemLink method in a similar manner.

Result := TObject(FilterableColumns[Index].Index);

The ItemLinkNames property and the GetItemLinkName method provide access to unique names (string representations) that are used to distinguish item links created in the filter control.

See Also