RobotStudio event

Data binding with ComboBox

I have a ComboBox with the SelectedIndex bound to a controller object (PERS num).  When I load the main, the value is set to -1 rather than the actual value in the controller.  If a list item is selected, the value in the controller is updated correctly, to match the selected item.  If I go to another window and return, the value is reset to -1.
 

How can I get the box to retain and display the correct value?  I'm sure this must be something simple, but I can't find the solution in the manual.  I have tried adding an actionTrigger, but I don't know what action to call.

 

TIA
Jim Haglund

Comments

  • i hope you have found the solution by now. I was not able to replicate the same behaviour. Let me clarify myself with what you have written in the post.

    1. Is it right if i go by the fact that there are some items in the combo box. Are these items binded to the rapid array.

    2. There exists either a rapid variable pers num or application variable which is binded to the SelectedIndex property.

    3. On launching the main screen the item based on the selected index is displayed and should not change if moved between screens or moved from one view to another (Program Data to YourScreen)

    4. If any other item is selected to in combo box it should retain the value unless the index of combo box item is controlled from another control.

  • After reading your post, I went back again and reviewed my application.  I discovered that both the selected index and selected value were bound to the same rapid variable.  With just the selected index, it works as I expected.  In retrospect, I would have thought it might generate an error message?
     

    Thanks for responding
    Jim Haglund