StrataFrame Forum

Combobox.requery upon value changed in other combobox

http://forum.strataframe.net/Topic5638.aspx

By kkchan - 1/7/2007

Hi,

I have 2 combobox in my form, cboStates and and cboCountries.

I want to populate list of cbostates based on the value of cboCountries.



What event will be raised if user changed any value to cboCountries?



I only see two events published in property sheet.



Thank you
By kkchan - 1/7/2007

Hi,

FYI, I also set parentrelationship, parentbusinessobject.
By Trent L. Taylor - 1/7/2007

What event will be raised if user changed any value to cboCountries?

Then you must have something wrong.  This combo inherits a standard combo and has all of those associated events.  You need to handle the SelectedIndexChanged event.

FYI, I also set parentrelationship, parentbusinessobject.

This will not impact this scenario.

By kkchan - 1/7/2007

Hi,

Do you meant that, I got to requery cbostate manually? Setting parentrelation ship and etc will not auto-requery child BO?



Thank you
By kkchan - 1/8/2007

Done. Thank you
By StrataFrame Team - 1/8/2007

You could optionally set the ChildAutoFilterOption on the parent business object and populate the child business object will all of the records necessary for all records within the parent business object.  Then, as you navigate, the filter will automatically be set on the child business object to only show records that match the current parent record.  Otherwise, yes, you will need to repopulate the child business object manually.
By kkchan - 1/8/2007

Hi,

Thank you for explanation.



Then, as you navigate, the filter will automatically be set on the child business object to only show records that match the current parent record.




Navigate meant moving record "pointer" via naviagtion toolbar? Does it apply to "navigation" (move hightlight different record) of combobox, listbox, listview and etc?
By Trent L. Taylor - 1/8/2007

It refers to the record pointer being moved in any way within the BO.  If you use the MaintenanceFormToolstrip or manually call the Navigate() method on the BO itself.