TAdvStringGrid - ComboBox problem when using TAB

Open sample 73 

Set Property Options.goTabs to true.

Now run the sample.
Use arrow keys to choose a cell - and press enter to activate editor.
Select any of the countries (arrow up/down).
When desired country is selected - use TAB to go to next cell. (do not press ENTER !)
The result will be a blank cell.

If combined with Navigation.AdvanceAutoEdit set to true ... 
Just run the sample and press TAB (hold the TAB key) .. and all cells will get "blanked"

During this examination you wil probably notice that - The GetDisplText event is trigger A LOT!
Why is that needed?
Sometimes GetDisplText event handler variable - Value - will contain the country in plain text.
This worries me.

Anyone have ideas on how to fix all this?

Just saw that a new release is out ( component pack) - installing and re-testing.

Will report back in a few minutes if anything has changed.

Grid version

Same problem. 

Any suggestions?

We've investigated this and traced & fixed the problem. This was a special case of using a combobox with virtual cells. The next update will address this.

Glad to hear that it will get fixed soon :-)

I've got a pre-release of the grid.
If the reported issue is the one described in the release note ... : Fixed : Rare issue with virtual cells, edComboList inplace editor

Then I can tell you that it does not work.

New problem is : Tabbing out of a visible dropdown into a standard text column, sets the cell to the text from the dropdown.

I will see if I can replicate in sample 73.

Howto reproduce the issue

Use sample 73 - Navigation.AdvanceAutoEdit set to true ... 
Add this handler ...

procedure TForm1.AdvStringGrid1GetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType);
  if ACol = 2 then
    AEditor := edNormal;

Run and start tabbing.

Tested demo 73 with:

procedure TForm1.FormCreate(Sender: TObject);
  advstringgrid1.Navigation.AdvanceAutoEdit := true;

  advstringgrid1.Options := advstringgrid1.Options + [goEditing, goTabs];
  advstringgrid1.DefaultEditor := edComboList;
  advstringgrid1.ComboBox.Items.AddObject('Germany', TObject(0));
  advstringgrid1.ComboBox.Items.AddObject('France', TObject(1));
  advstringgrid1.ComboBox.Items.AddObject('Spain', TObject(2));
  advstringgrid1.ComboBox.Items.AddObject('Russia', TObject(3));

  advstringgrid1.Cells[1, 1] := '0';
  advstringgrid1.Cells[1, 2] := '1';
  advstringgrid1.Cells[1, 3] := '2';
  advstringgrid1.Cells[1, 4] := '3';


procedure TForm1.AdvStringGrid1GetEditorType(Sender: TObject; ACol,
  ARow: Integer; var AEditor: TEditorType);
  if ACol = 2 then
    AEditor := edNormal;

and I cannot see a problem.
The problem is still there ? but you will have to work for it :-)

Run it ? dropdown the combo in column 1 ? hover mouse over a selection ?. And TAB !
Selected value is now displayed in column 2 ?

This issue is fixed now. The next update will address this.

Great :-)

I will request latest source from Nancy if needed.

There is still a problem here:

Try having different values in the dropdowns - then you will notice that tabbing from one dropdown to another ... the value from the cell you are leaving is displayed momentarily in the dropdown you are tabbing into.

Furthermore - SHIFT + TAB (going backwards) results in blank cell value, when tabbing from dropdown to a normal text cell.

Correction : the blanking of cell values happens only when AdvanceAutoEdit is true.... and it happens when using TAB or SHIFT+TAB ... direction does not matter.

Are you adapting the OnGetDisplText accordingly because this event does a lookup of the cell text and relies on the cell being edited with a combobox.
This whole demo 73 is based on virtual cell and virtual cell editing based on a a list of values in a combobox, so, starting to mix this with regular editors that break this lookup mechanism will of course fail.

Other than this, can this communication be moved to support email with a sample source project with exact property settings and exact steps because there is every time partial information that makes it inefficient to investigate issues in a targetted way.