As shown in this image below, I need to select the value of the txtID
field when clicking on the item in the ListView. How do I do that?
procedure TForm1.ListView1ItemClick(const Sender: TObject;
const AItem: TListViewItem);
begin
showmessage(AItem.Objects[1].Data.AsString); // Value of field
showmessage(AItem.Objects[1].Name); // Name of field
// OR
showmessage(AItem.Data['txtID'].AsString); // Value of field
end;