Filter a multiple column listview
===

The following bit of code will filter the items of a `TListView` control based upon what is typed in an `TEdit` control and it works fine if the ListView consist of a single column, if you have more then 1 column however, then the items in the other columns are destroyed when the filter is applied, so I hoping someone might know what would need to be added to the code below to preserve those columns when the ListView is filtered.

    unit Unit1;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, strutils, StdCtrls, ComCtrls;
    
    type
      TForm1 = class(TForm)
        ListView1: TListView;
        Edit1: TEdit;
        procedure Edit1Change(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
      StrList : TStringList;
    
    implementation
    
    {$R *.dfm}
    
    procedure TForm1.FormCreate(Sender: TObject);
    var
       Index : Integer;
    begin
         StrList := TStringList.Create;
         for Index := 0 to ListView1.Items.Count -1 do
            StrList.Add(ListView1.Items[Index].Caption);
    end;
    procedure TForm1.Edit1Change(Sender: TObject);
    var
       Index : Integer;
    begin
       ListView1.Clear;
       for Index := 0 to StrList.Count - 1 do
         if Pos(Edit1.Text, StrList.Strings[Index]) > 0 then
            ListView1.AddItem(StrList.Strings[Index], nil);
       if Edit1.Text = '' then
         for Index := 0 to StrList.Count - 1 do
           ListView1.AddItem(StrList.Strings[Index], nil);
    end;
    
    
    end.