TAdvColumnGrid AddComboString

D2006,  TmsSoftware Pack 6.6.4.0   TAdvColumnGrid  version 3.1.3.3

Hi All,

When I try to add value in a combobox on the grid  (through OnGetEditorType -> AEditor := edComboList; ), 
My combovox  is empty

My code ;

    AEditor := edComboList;
    case ACol of
      4 : FDataModule.ShowStock(Self.GridView);
    end;

----

procedure TStockDataModule.ShowStock(AGrid: TAdvColumnGrid);
begin
  AGrid.ClearComboString;
  AGrid.AddComboString(STR_STOCK_ALL);
  while (not TYPESTOCK.Eof) do
  begin
    AGrid.AddComboString(TYPESTOCK.FieldByName(CDS_FIELDNAME_TYPE_STOCK).AsString);
    TYPESTOCK.Next;
  end;
end;

Any Idea

Thanks

Patrick



If you use TAdvColumnGrid, it is recommended to use grid.Columns[colindex].ComboItems where you can add the values of the combobox.

Thanks Bruno, it works now