Board index » jbuilder » JDBComboBox display empty value instead of first record on dataset

JDBComboBox display empty value instead of first record on dataset


2005-04-05 12:39:37 AM
jbuilder22
Ok, when associating a dataset with a JDBCOMBOBX, you're supposed to see the
first record in from the dataset in the combobox. Well, it is not. It is
displaying an empty record and I have to click on the combobox to select a
record. How can I get it to display the "default" first record on the list?
TIA
 
 

Re:JDBComboBox display empty value instead of first record on dataset

I figured it out through manipulation of the table on teh database (Mysql).
Setting the default value on that column within the Mysql database to
correspond to the value the record should have.
The problem with this is if there's been any data normalization or
reloading, then the indexes might be changed. so, the best way to do it is
ot validate the input and making sure the user actually picks something
instead of an empty value
....jdbcombobox.getselectedindex(jdbcomboboc.getvalueat....));
"PingLee Quan" < XXXX@XXXXX.COM >wrote in message
Quote
Ok, when associating a dataset with a JDBCOMBOBX, you're supposed to see
the first record in from the dataset in the combobox. Well, it is not.
It is displaying an empty record and I have to click on the combobox to
select a record. How can I get it to display the "default" first record
on the list?



TIA

--