I have an UltraComboEditor on a screen. It's very pretty. But empty.
The values that I wish to have drop down are in a temp-table. So I have done the following in my initialization code:
create query q.
q:set-buffers( buffer myTT ).
q:query-prepare( "preselect each myTT" ).
q:query-open.
...
myScreen:bindingSource5 = q.
myScreen:ultraComboEditor1:DisplayMember = "myField".
myScreen:ultraComboEditor1:DataBind().
and then, after building myTT:
myScreen:ultraComboEditor1:Refresh().
Unfortunately no amount of cursing (or fiddling with DataMember vs DisplayMember vs ValueMember) seems to convince the dropdown that it has any values to drop down (yes, myTT has data -- 12 rows to be exact...).
Obviously I am once again missing the secret decoder ring
I have an UltraComboEditor on a screen. It's very
pretty. But empty.
The values that I wish to have drop down are in a
temp-table. So I have done the following in my
initialization code:
create query q.
q:set-buffers( buffer myTT ).
q:query-prepare( "preselect each myTT" ).
q:query-open.
...
myScreen:bindingSource5 = q.
you need both
myScreen:BindingSource5:Handle = q
and
ultraComboEditor1:DataSource = myScreen:bindingSource1.
myScreen:ultraComboEditor1:DisplayMember =
"myField".
myScreen:ultraComboEditor1:DataBind().
d then, after building myTT:
myScreen:ultraComboEditor1:Refresh().
fortunately no amount of cursing (or fiddling with
DataMember vs DisplayMember vs ValueMember) seems to
convince the dropdown that it has any values to drop
down (yes, myTT has data -- 12 rows to be exact...).
Obviously I am once again missing the secret decoder
ring
-- peter
Have you set myScreen:ultraComboEditor1:DataSource to myScreen:bindingSource5?
Two fools - same reply - same minute
Typo. I did have :handle. And the datasource = bindingsource is also in there, I forgot to show it
Did you try the UltraCombo instead? I once had an issue with UltraComboEditor not showing all records.
Got it!
I needed to re-open the query just prior to the refresh(). Duh.
Just to be on the safe side: What does q:NUM-RESULTS show?
12.
Funny you should mention not getting all the items in the combo-box. I have it sort of working now but, as you suggested happened to you, it is only showing 4 items. I even set MaxDropDownItems to 20 with no success
Progress is easy. This Windows stuff is Byzantine.
Progress is easy. This Windows stuff is Byzantine.
You just need to complete your transformation from a ChUIMonster into a GUIMonster.
Try tra UltraCombo (not the UltraComboEditor). That should make a difference.
Yes. The UltraCombo shows all the rows. Kind of ugly though. But I suppose if I spend some time with the properties I can clean that up
Peter, have you seen that difference as well? Any explanation why the UltraComboEditor skips/drops some rows (and add a few empty rows) and the UltraCombo does work as expected?
Is there already a bug logged for this or are we doing something wrong?
Peter, have you seen that difference as well? Any
explanation why the UltraComboEditor skips/drops some
rows (and add a few empty rows) and the UltraCombo
does work as expected?
I do not (have an explanation, that is). I do see this behaviour, and also with the System.Windows.Forms.ComboBox.
I have a workaround (other than to use the UltraCombo).
Is there already a bug logged for this
There's an old one, but I'd suggest you contact TS about this.
>or are we
doing something wrong?
Doesn't look like it. This time, at least
-- peter
I have a workaround (other than to use the
UltraCombo).
If you don't need to Sync with the CurrencyManager (i.e. automated reposition of the query based on the combo value) that works as a workaround.
>or are we
doing something wrong?
Doesn't look like it. This time, at least
You're sure?
>or are we
doing something wrong?
Doesn't look like it. This time, at least
You're sure?
Well, I'm not going to argue with a 1000+ poster
-- peter
There's an old one, but I'd suggest you contact TS
about this.
Logged with support as: W902200013
Tech support logged a Bug for this. They found out that using a ProDataset instead of a query works as expected for both combo box types.
Hi,
does anyone have an example of how to actually databind an UltraCombo using a pro dataset?
Thanks.
does anyone have an example of how to actually databind an UltraCombo using a pro dataset?
Drop a ProBindingSource onto the form (you can give it a schema if you like, but don't - strictly speaking - need to).
On the SmartTag, set bindingSource1 as the Data Source for the UltraComboEditor.
In code, somewhere after the InitializeComponent call in the form's constructor, associate the binding source with the dataset:
bindingSource1:Handle = hProDataset /* or dataset dsData:handle */
And you should be good to go.
-- peter
Hi,
Thanks for that. I am however still struggling to get any data into my ultraCombo.
I've included the source below. I apologise if I've done something stupid!
The message block indicates the data is actually there!
DEFINE TEMP-TABLE ttCustomer NO-UNDO
FIELD TRADING_PARTNER_NUMBER AS INTEGER
FIELD CUSTOMER_REFERENCE AS CHARACTER.
DEFINE DATASET hDset FOR ttCustomer.
DEFINE DATA-SOURCE srccustomer FOR Customer.
.........
bindingSource1 = NEW Progress.Data.BindingSource().
BUFFER ttCustomer:ATTACH-DATA-SOURCE(DATA-SOURCE srccustomer:HANDLE).
DATASET hDset:FILL().
BUFFER ttCustomer:DETACH-DATA-SOURCE().
FOR EACH ttCustomer:
MESSAGE CUSTOMER_REFERENCE
VIEW-AS ALERT-BOX.
END.
bindingSource1:Handle = DATASET hDset:HANDLE.
ultraCombo1:DataSource = bindingSource1.
ultraCombo1:DataBind().
ultraCombo1:Refresh().
bindingSource1 = NEW Progress.Data.BindingSource().
BUFFER ttCustomer:ATTACH-DATA-SOURCE(DATA-SOURCE srccustomer:HANDLE).
DATASET hDset:FILL().
BUFFER ttCustomer:DETACH-DATA-SOURCE().
FOR EACH ttCustomer:
MESSAGE CUSTOMER_REFERENCE
VIEW-AS ALERT-BOX.END.
bindingSource1:Handle = DATASET hDset:HANDLE.
ultraCombo1:DataSource = bindingSource1.
ultraCombo1:DataBind().
ultraCombo1:Refresh().
I would swap these lines.
bindingSource1:Handle = DATASET hDset:HANDLE.
ultraCombo1:DataSource = bindingSource1.
The last 2 lines are not necessary.
-- peter