AdvStringGrid: Scroll through combo with key up/d

Hi,

I'm using a AdvStringGrid where one of the column is of combobox type. When clicking the cell so it goes to edit mode (not dropped down) I would like to be able to press key up/down to switch ("scroll") between the combobox items, but when I press key up/down it just jumps out of edit mode. How do I achieve this behaviour?

Best regards

You can set:

AdvStringGrid1.MouseActions.DirectComboDrop := True;

Thanks for the quick response!

I guess that could work. I do run into a weird issue - if I click the cell to edit (the dropdown shows up), I start typing something that exists, it autofills to that, then if I left click (mouse) somewhere inside the cell, the dropdown list will start flashing up and down.

Is it possible to achieve what I want without showing the combobox on first click?

Do you use the latest version of the grid, as I could not see a problem here.

Test code:

procedure TForm1.FormCreate(Sender: TObject);
begin
  advstringgrid1.DefaultEditor := edComboEdit;
  advstringgrid1.Combobox.Items.Add('BMW');
  advstringgrid1.Combobox.Items.Add('Mercedes');
  advstringgrid1.Combobox.Items.Add('Audi');
  advstringgrid1.Combobox.Items.Add('Porsche');
  advstringgrid1.Combobox.Items.Add('Ferrari');
  advstringgrid1.Combobox.Items.Add('Ford');
  advstringgrid1.MouseActions.DirectEdit := true;
  advstringgrid1.MouseActions.DirectComboDrop := true;
end;

Click to start edit, enter some character, click in the cell, .... just closes the combobox as is, without flashing.
If you use the latest version and a problem persists, please provide more details how we can reproduce this here.

It was a custom event that caused the flickering.

I don't like this behavior though:

- Click to edit, start typing, autofills to suitable item [if enter is pressed, this value is selected - ok], if the user clicks in the edit field nothing is selected. I would like the autofilled item to stay selected after this action. How do I achieve this?

I cannot see the issue.
With the setup code as provided in the previous post, when I click a cell, enter 'Me' it autocompletes to 'Mercedes'. When I click in the edit area, 'Mercedes' becomes completely selected and when I leave the cell (by keyboard or mouse) this selected value is in the cell.