[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomListView.OwnerData

Enables or disables owner data (virtual) mode for the list view control.

## Declaration

Source position: comctrls.pp line 1681

`public property TCustomListView.OwnerData : Boolean read FOwnerData write SetOwnerData default False;`

## Description

OwnerData is a Boolean property which enables or disables virtual mode for the list view control.

When set to True, the Items property does not contain the actual data displayed on the control. Only the most recently accessed list item exists in the list view control. This allows the list view to be used to display a large number of items with a minimal amount of overhead. List item content is located and retrieved using event handlers in the control.

OnData
  Retrieves the content for the selected / focused virtual list item.
OnDataFind
  Locates a virtual list item with a specified value.
OnDataHint
  Notifies the control when a caching hint for virtual data is received and handled in the control.

Set the value for the Count property in Items to indicate the number of owner data items available to the list view control. Assign a routine to OnData to populate an individual list item (and sub-items if needed) from the source for the owner data.

When OwnerData is set to False, all values displayed on the list view control are maintained in the Items property.

OwnerData is one of the TListViewProperty values included in the TListViewProperties set type and exchanged with the widgetset class. The property value is read from and written to the TCustomTreeview widgetset class instance when its handle is valid. Changing the value for the property causes the widgetset class to be updated with the new value.

## See also

TCustomListView.Items |  | Collection of list items displayed on the list view control.
TCustomListView.Columns |  | Collection with the column definitions for the list view control (size, alignment, image index, etc.).
TCustomListView.Column |  | Provides indexed access to the columns defined for the control.
TCustomListView.OnData |  | Event handler signalled to the value(s) for a list item when OwnerData (virtual mode) has been enabled.
TCustomListView.OnDataFind |  | Event handler signalled to locate list item data when OwnerData (virtual) mode is enabled.
TCustomListView.OnDataHint |  | Event handler signalled to load a range of cached list items in the virtual storage for the control.
TCustomListView.OnDataHint |  | Event handler signalled to load a range of cached list items in the virtual storage for the control.
TListItems.Count |  | The number of TListItem instances stored in the container.
TListViewProperties |  | Set type used to store values from the TListViewProperty enumeration.
TListViewProperty |  | Represents Boolean properties used in TCustomListView.