Toad World® Forums

Using combobox in customized form


I created some custom string properties in MetaModel. These properties are applied on class PERDomainOR (object type: 2006).

Note: I had to use PERDomainOR (and not PERDomain) because Domain Edit Form is already customized in “Database Oracle” package, so I had to create a new package extending this one.

Then I tried to edit them via a customized form. Using a simple DataEdit textbox, they are saved and loaded correctly from my ERD model.

But If I try to use a DataStaticComboBox (in dropdown list mode, to only accept a predefined set of string values) they completely stop working.

In fact, when I select a value from the combo and then click “Apply”, the value disappears.

Saving and opening my ERD model in a text editor, I can see custom property tags within each node, but they are empty.

Even if I try to manually write a valid value in the XML file, when opened, the combo does not load the value.

Combo’s DataSource and DataField are set the same as (working) DataEdit textbox, and StoreDirectly property is set to true.

What can I do?

If of any help, we’re currently still on Toad 5.3.

Hi Tommaso,

I tested it on Version TDM 5.3 and it is works OK. I prepared to you example package valid for version TDM 5.3. Package contain class in metamodel PERDomainOR with new Property PropertyA. PropertyA has type string and it is external (checkbox external on property form). Property has set attribute editable and store. Package contain Partial Form Definition for PERDomainOR. In partial form definition is created DataStaticComboBox. DataStaticComboBox has set DataSource=Domain, DataField=PropertyA and Items to Caption Value Pairs(see picture below)

Maybe you have incorrect set Items. In Attachment bellow is all in package. If you have still problems please post your customization package and I will review it.



Ok, thanks.

It now works correctly. I was putting only values in the Editor window, not Caption/Value pairs.

But I had to use Value=Caption, not Caption=Value (supponing Caption to be the one displayed, and Value the one stored in model XML).

Anyway, now the combos show both Caption and Value:

Is there a way to only show caption? (e.g. just Guid should be shown in the example above)

Hi Tommaso,

You are right. Good form is Value=Caption.

To Display only Caption change Style of DataStaticComboBox to default “csOwnerDrawFixed”. I think you have “csDropDownList”.


Thanks, it worked.

I used csDropDownList because csOwnerDrawFixed appeared (at least graphically) to be the manually editable one, but it’s not.