vcl-dxlistview-b454f046.md
The procedural type for list item selection handlers.
TdxListViewSelectItemEvent = procedure(Sender: TdxCustomListView; AItem: TdxListItem; ASelected: Boolean) of object;
| Name | Type | Description |
|---|---|---|
| Sender | TdxCustomListView |
The List View control that raised the event.
| | AItem | TdxListItem |
The target list item.
| | ASelected | Boolean |
The item’s selection state.
|
The following OnSelectItem event handler prohibits a user from selecting an item:
procedure TForm1.dxListViewControl1SelectItem(Sender: TdxCustomListView;
AItem: TdxListItem; ASelected: Boolean);
begin
if ASelected then
AItem.Selected := False;
end;
void __fastcall TForm1::dxListViewControl1SelectItem(TdxCustomListView *Sender,
TdxListItem *AItem, bool &ASelected)
{
if (ASelected)
AItem->Selected = false;
}
The List View’s OnSelectItem event references the TdxListViewSelectItemEvent type.
See Also