DBCombo Initially Blank 
Author Message
 DBCombo Initially Blank

I have an app going 32-bit ODBC to Access.  One form has a couple of
TDBCtrlGrids which contain two TDBComboBoxes linked to various
datafields.  When the underlying panel and related data sources first
populates, the combos appear blank and do not initially show the values
in the underlying data rows.   If you drop down the list, the proper
value appears highlighted in the list.  If you press <Esc>, now you can
see the original value in the edit box portion of the control.  Data
Field and Data Source are correctly set.  Style is csDropDownList.  The
item list population is programmed the same was for other (non
TDBCtrlGrid) DBCombos elsewhere in the app. The initial values of the
data in the row are definitely in the item list of the drop down.

Setting style to csDropDown makes the original value show up normally.  
I thought this might mean csDropDownList needed a default set, but
Borland's documentation says (page 134) "[it] displays the value for the
field in the current row, regardless of whether it appears on the item
list".  This is as opposed to a TDBListBox where the documentation says
that a default value shows.

I know this is probably something stupid.  Or else the documentation
is just plain wrong.  

Any ideas?

Thanks!n



Sun, 14 Feb 1999 03:00:00 GMT  
 DBCombo Initially Blank

Quote:
>>Setting style to csDropDown makes the original value show up normally.

  I thought this might mean csDropDownList needed a default set, but
Borland's documentation says (page 134) "[it] displays the value for the
  field in the current row, regardless of whether it appears on the item
  list".  This is as opposed to a TDBListBox where the documentation
says that a default value shows.

I know this is probably something stupid.  Or else the documentation
is just plain wrong.  <<

The documentation is incorrect.  If you use the Style of csDropDownList
then the value must appear in the Items property initially show the
datafield's value.  

God Bless,

--

09/11/96 22:14
---------
Using: OUI PRO 1.5.0.2 from http://www.dvorak.com



Mon, 01 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Delphi: Read-only units initially

2. PickList for DBCombo?

3. DBCombo informations

4. DBEdit to DBCombo

5. DBCombo or DbList with Index into Field

6. DBCombo & DBList boxes

7. DBCombo Box Update

8. DBLookUpCombos vs DBCombos or Combos

9. d2:searching for special dbcombo

10. DBCombo Problem?

11. Dbcombo

12. blank screen when doing graphics in tp for dos 7

 

 
Powered by phpBB® Forum Software