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

TcxCustomListView.OnCreateItemClass Event

In This Article

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

#Declaration

Delphi
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