Back to Devexpress

TdxListViewEditedEvent Type

vcl-dxlistview-89b88e9b.md

latest1.4 KB
Original Source

TdxListViewEditedEvent Type

The procedural type for list item caption change handlers.

Declaration

delphi
TdxListViewEditedEvent = procedure(Sender: TdxCustomListView; AItem: TdxListItem; var S: string) of object;

Parameters

NameTypeDescription
SenderTdxCustomListView

The List View control that raised the event.

| | AItem | TdxListItem |

The target list item.

| | S | string |

The edited item caption.

|

Remarks

The following OnEdited event handler discards changes made in an in-place editor if a user assigns an empty string to an item caption:

delphi
procedure TForm1.dxListViewControl1Edited(Sender: TdxCustomListView;
  AItem: TdxListItem; var S: string);
begin
  if S = '' then
    S := AItem.Caption;
end;
cpp
void __fastcall TForm1::dxTreeViewControl1Edited(TdxCustomListView *Sender,
  TdxListItem *AItem, UnicodeText &S)
{
  if (S == "")
    S = AItem->Caption;
}

The List View’s OnEdited event references the TdxListViewEditedEvent type.

See Also

dxListView Unit