JimKueneman 1 Posted January 11, 2023 When I access TListview.Items when the search bar contains a string the property is only returning items that are presented in the LV during that time. I have data stored in the ObjectTag that is being updating in the background so when it comes in I need store it in these object but during a search I can't access them through TListview.Items I am not seeing a property that give me access to the unfiltered list of items stored in the list view. How to I access a full list of TListview Items while the control is in search mode? Thanks, JIm Share this post Link to post
programmerdelphi2k 237 Posted January 11, 2023 (edited) hi @JimKueneman you can try this way: implementation {$R *.fmx} uses System.Generics.Collections; procedure TForm1.FormCreate(Sender: TObject); var LVI: TListViewItem; begin for var i: integer := 0 to 30 do // for tests... begin LVI := ListView1.Items.Add; LVI.Text := 'Item' + i.ToString; end; end; procedure TForm1.ListView1SearchChange(Sender: TObject); var LText: string; begin for var i in ListView1.Items.UnfilteredItems do if i is TListViewItem then LText := LText + TListViewItem(i).Text + slinebreak; // Memo1.Text := LText; end; Edited January 11, 2023 by programmerdelphi2k 1 1 Share this post Link to post
JimKueneman 1 Posted January 11, 2023 OMG that is embarrassing... thank you... Share this post Link to post