sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

OnChange Event for ComboBox control

I have a ComboBox that is being filled with a list of databases from the ShowSQLDatabases custom action... and I want to trigger a new custom action every time a the chosen value in the combo box changes.

The reason I need to execute this external custom activity is to validate the database patch level prior to permitting the installation/configuration of the app against the database the user has chosen. The result of the custom action will then control whether the next button is enabled or not.

However, when I go to the Control Events Wizard, and attempt to choose the ComboBox control, the ComboBox is not listed in the available Target controls.

How can I bind the custom activity to what is effectively an "OnChange" event for the ComboBox ?
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: OnChange Event for ComboBox control

Hello,

I'm afraid we don't have a predefined functionality for this. However, in order to achieve what you want you can proceed like this (if you are using a custom action without UI):
- Go to "Themes -> Settings" tab and turn off our Enhanced UI feature.
- Go to "Table Editor" page and in the "ControlEvent" table add new rows like this:
  • Dialog_: Your Dialog Name
    Control_: Your ComboBox Name
    Event: DoAction
    Argument: YourCustom Action Name
    Condition: Your_ComboBox_Property = "first item value"
    Ordering: 1

    Dialog_: Your Dialog Name
    Control_: Your ComboBox Name
    Event: DoAction
    Argument: YourCustom Action Name
    Condition: Your_ComboBox_Property = "second item value"
    Ordering: 2
...
- Build and run your project.

Please keep in mind that our "Table Editor" feature is available only in an "Enterprise" or higher project type.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sbrown_el
Posts: 20
Joined: Wed Dec 05, 2012 4:07 pm

Re: OnChange Event for ComboBox control

Daniel.Radu wrote:Hello,

I'm afraid we don't have a predefined functionality for this. However, in order to achieve what you want you can proceed like this (if you are using a custom action without UI):
- Go to "Themes -> Settings" tab and turn off our Enhanced UI feature.
- Go to "Table Editor" page and in the "ControlEvent" table add new rows like this:
...
...
- Build and run your project.

Please keep in mind that our "Table Editor" feature is available only in an "Enterprise" or higher project type.

Let us know if this helped.

All the best,
Daniel
Thanks, Unfortunately, the content of the combo box is going to be dynamic (its populated from the ShowSQLDatabases external action) so this doesnt really help.

I've added a button to the UI to trigger the Test action, which in turn updates the UI element which controls the Next button... and while clumsy from a UI experience perspective, this does work...

Return to “Building Installers”