Multi ComboBox

I,


for my project, i created a dynamic Grid where Columns and Rows are created on source code.

In my "For" loop, i have something like :

for := 0 to Count Do
begin
  GridMesures.Columns.Add;
  NbCol := GridMesures.Columns.Count - 1;
  if type = 1 Then
  begin
GridMesures.Columns[NbCol].Editor := edEditFloat;
        GridMesures.Columns[NbCol].ColumnType := ctNormal;
   end
   else
   begin 
        GridMesures.Columns[NbCol].Editor := edCombo;
        GridMesures.Columns[NbCol].ColumnType := ctDynCombo;
        GridMesures.Columns[NbCol].ComboItems.Add('A');
        GridMesures.Columns[NbCol].ComboItems.Add('B');
        GridMesures.Columns[NbCol].ComboItems.Add('C');
   end;
end;


My problem is for instance : 
My 1st column is type <> 1 So Combo. Values are : A,B,C.
My 2nd is Type = 1 so an Edit.
My 3rd is type <> 1 so combo and Values are here : A,B,C,A,B,C

He doubled up my values but i added Item in another ComboItems Column.

What's bad in my source code ?

Regards.



Hi,


Can you please try to clear the ComboItems list before adding items?

Example:
GridMesures.Columns[NbCol].ComboItems.Clear;
GridMesures.Columns[NbCol].ComboItems.Add('A');

It works fine, thank you.


Another question : 
In my grid, i choosed ShowFooter = False.
But here's my grid : 

Why there is 3 combobox in the bottom of my grid ?

Regards



I have not been able to reproduce this issue.

Can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Please also let me know which version of IntraWeb and which browser you are using.

Hi,


sorry for my late answer.
I don't have the combo on footer anymore cause i changed ColumnType to ctNormal instead of ctDynCombo. 
But now, my combo are only visible if i click on the cell, not all the time (as in the Demo).

Does exist any mean to let the combo always visible ?

Regards

PS : I'm using Delphi 2010, IW 14.0.23 and browser IE11 or last version of Chrome in windows 7.

By design the Columns[].Editor is only visible for a row that is in edit mode.

The only way to display a combobox in browse mode is to use the ctDynCombo ColumnType.

Mistake ; i'm in IW 14.0.31


Thank you for your answer. 
In first time, i'll use ctNormal because i had some troubles with ctDynCombo (for instance, in Chrome, you have to keep mouse click down to chose an item in a combobox).

In a few time, i'll come back with a sample project with ctDynCombo to understand what is not good in my project.

Regards