Cannot update cell color on ComboChange event


I have a grid with 2 columns: 
column A with a combobox 
column B with a text

Depending on combobox A selection, column B has grey or white color (brush color)
Colors are set using GetCellColor event.

What I want:
after selecting an item in my combobox, the cell color of column B must change
What's happening
after selecting an item in my combobox, the GetCellColor is fired correctly, but the "Cells" function is returning the "old" combobox value. (example: Item1 is selected on combox >> I select Item2 >> in the GetCellColor event the Cells function is returning "Item1" >> If I clic another time on Item2, this time Cells returns "Item2"

My ComboChange event:
procedure XXX.gridDataComboChange(Sender: TObject; ACol, ARow, AItemIndex: Integer; ASelection: string);
    if (ARow > 0) then
// Force cell repainting
gridData.RepaintCell(colB, ARow);
      end; {if}

My GetCellColor event
procedure XXX.gridDataGetCellColor(Sender: TObject; ARow,
  ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont);
    if (ARow > 0) and (ACol = ColB) then
if (gridData.Cells[colA, ARow] = 'Item 1') then
ABrush.Color:= gridData.Color;
if (gridData.Cells[colA, ARow] = 'Item 2') then
ABrush.Color:= clGray;
      end; {if}

I hope I have explained my issue.

Claudio Basso

What you see is by design as the grid.Cells[] property is only updated after inplace editing with the combobox stops and not when just the selected combobox value changes. If you do not want to use grid.Colors[] to update the cell color from the combobox change event, you could in your OnGetCellColor event handler check if the grid is in EditMode in the combobox column and in that case, get the value via   AdvStringGrid1.Combobox.Text

Ok, Thanks!