Subject Re: [IBO] TIB_ComboBox dropped on a TIB_Grid
Author Helen Borrie
At 12:07 PM 21-11-01 +0000, you wrote:
> > >>>>> Note that this property is ignored if the Style is
>csDropDown. <<<<<
> >
>
>So what is the point?

The point is that using ItemValues to enter values for storage, that are different from the corresponding items[] won't work when style is csDropdown. But this doesn't seem to be an issue for you, since you want to apply values directly, not supply codes.

>My combobox is csDropDown, otherwise I cannot
>enter values other than in the list. Still, the grid does not show
>values in the column (its empty) for
>(a) any value if I don't have ItemValues

Do you have the combobox's Datasource property set to the IB_Datasource object of the dataset in the grid? And its Datafield item set to the column which you want the combobox to populate?

>(b) any value not in the list if I have ItemValues
>... so I don't see that the combobox ignored ItemValues...
>Item values do properly show up when the combobox is active, but only
>for the current cell.
>
>Anyway, none of the settings makes the items appear in the grid
>always and no matter if in the list or not. Is this a bug?

No, it works if the Datasource and Datafield properties are correct AND if the grid's dataset is in Edit or Insert mode...in other modes, the combobox will be "empty".

This is what you should see in Edit or Insert mode:

a) If the grid column has a value AND it matches a value in the combox's Items[], then the matching value will be the currently displayed text in the editbox portion of the combobox control.
b) If the grid column has a value which is not matched in Items[], or is null, the editbox of the combobox control will be empty. You can drop down the combobox and select an item from the list. Then the editbox and the grid cell will show the same text.

Is this what you are seeing?

Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________