TAdvStringGrid with combo box with 3000+ items

I have a grid with one column as a combobox column. Performance has been getting worse and when I looked into it, some users have 3000+ items in the dropdown. That would explain the performance issue. :slight_smile:

The cell needs to show the user matches for what they are typing so they can easily select an existing value. Any suggestions about how to achieve that efficiently?

Thanks.

I would assume this depends on the code that loads the 3000+ items in the combobox.

I did a test here with the following code:

procedure TForm1.AdvStringGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
var
  i: integer;
  t: dword;
begin
  t := GetTickCount;

  AdvStringGrid1.Combobox.Items.BeginUpdate;
  AdvStringGrid1.Combobox.Items.Clear;

  for i := 0 to 5000 do
    begin
      AdvStringGrid1.ComboBox.Items.Add('combo item ' + i.ToString);
    end;

  AdvStringGrid1.Combobox.Items.EndUpdate;

  outputdebugstring(pchar((GetTickCount - t).ToString));

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  advstringgrid1.Options := advstringgrid1.Options + [goEditing];
  AdvStringGrid1.DefaultEditor := edComboList;
end;

and to load 5000 items, this takes +/- 300ms
So, I'm not sure what code you use and what time it takes?