AdvColumnComboBox

Good evening to all,
i have some question about this component.
My columncombobox have 2 column (0,1) where column1 is for description and column2 is for his code (ean).
I set the value with, in a table eof loop, this code (ACB is AdvColumnComboBox)

      with ACB.ComboItems.Add do
      begin
        Strings.Add(DM.TQR.FieldByName('Articolo').AsString);
        strings.Add(DM.TQR.FieldByName('EAN').AsString);
      end;

and i have for each line the description and his code.
Now, how i can do in order to show in a "text" only the description?
An, last one, there is any function in order to autoadjust the widh of the dropdown grid to show both description and ean?

Thank you for help
Have a nice evening
Daniele

You mean you do not want to see the EAN code?
If so, try to set the Width for this EAN column to zero.

There is at this moment not a built-in method to autosize the width of a column to the text it contains.
A TAdvGridDropDown has such functionality.

Hi Bruno,
thank you for reply.
I'm studing how use this component. It's very interesting because give in a dropdown control a complete stringgrid.
I have some question:
1 - There is UseItems property. If i set it to false i do not use items but i use the, not expose, grid poroperty.
In this matter non all the "grid usage" is allowed, for exampe how start the procedure with clean items (rows), meaning row:=0.
Also using TAdvGridDropDown.Grid.Fonts[0,0].Style:=[fsBold] does not have effect.
How i can use the full AdvStringGrid power ?
2 - In the .pdf stringgrid manual there is a good chapter where you explain how to customize the grid and the items as needed. Due the fact that what you explain is the "normal need" (change cells color and font) is possible have this TDropDownItemsEx as "default" items ? (In order to work with Use Items:=True, in fact in this case all the column item has the column's font. In my case, with UseItem:=True, i can't change header font (if header is grid cell [0,0[).

I tried to be more clear possible, if not ... excuse me.

Thank tou for the attention

Best regards
Daniele

It is the font style & color from AdvGridDropDown.Columns that takes priority. To override this, use the event handler OnGridGetCellColor

You could descend from TAdvGridDropDown and override CreateItems and create your own collection descending from TDropDownItems

Thank's ..