2

I have the following:

TMyObject = class(TObject)
...
public
   property Id: Integer read FId write FId;
   property Content: string read FContent write FContent;
end;    

TMyList = class(TObjectList<TMyObject>)

I use TMyList with TAdapterBindSource and TDataGeneratorAdapter to bind TMyList to a TListview. Ok, items was displayed properly.

When I click in the item of TListview, in OnItemClick, I need to know what TMyObject instance was assigned with the TListViewItem.

Using TListViewItem.Index does not work because my listview has header items and then index value does not correspond.

I need to get properties values of TMyObject when listview item is clicked.

Thanks.

Sir Rufo
  • 18,395
  • 2
  • 39
  • 73
Capslock
  • 59
  • 2

0 Answers0