Apr 25, 2010, 6:55 PM
Linked comboboxes in a from
I have a form that contains two linked comboboxes. I can see from the linked combobox example how selecting an entry from one can influence the other. My problem is that these are both populated within a form with existing values.
Can I use loadRecord(record) to load the form? If so how do I make sure that the lead combobox has its value for the second one to read a value from?
I have assumed that loadRecord() cannot be used and I call a method within a refreshdata event to set the form values. The record data contains two values; one for country and one for city.
The store with the list of countries is static and already loaded. That's great and using SetValue() on the combobox works.
Using SetValue() on the cities combobox does assign the value but the list of cities has not been loaded.
I have tried to databind() the store and the store is going and collecting the data but it never refreshes the combo with a list of items. That's the bit I am missing and I'm sure it's something simple but I haven't found it yet.
Anyone?
Can I use loadRecord(record) to load the form? If so how do I make sure that the lead combobox has its value for the second one to read a value from?
I have assumed that loadRecord() cannot be used and I call a method within a refreshdata event to set the form values. The record data contains two values; one for country and one for city.
The store with the list of countries is static and already loaded. That's great and using SetValue() on the combobox works.
Using SetValue() on the cities combobox does assign the value but the list of cities has not been loaded.
I have tried to databind() the store and the store is going and collecting the data but it never refreshes the combo with a list of items. That's the bit I am missing and I'm sure it's something simple but I haven't found it yet.
Anyone?