Skip to main content

TcxCustomListView.OnCreateItemClass Event

Enables you to supply items of a custom type to the list view control.

Declaration

property OnCreateItemClass: TLVCreateItemClassEvent read; write;

Remarks

The OnCreateItemClass event fires before a item is added to the control. For instance, it is raised when calling the AddItem method. You can handle this event to specify the type of the object that will represent the added item. The type must be a TListItem descendant.

Sender specifies the TcxCustomInnerListView.

The class of the item to be added must be assigned to the ItemClass parameter of the event.

Handle the OnCreateItemClass event if you need additional item settings as compared to the TListItem class. For instance, you may want to specify different font style for each item and use them when handling the OnCustomDrawItem event.

See Also