Programmatically Manipulate dijit.form.FilteringSelect

Discussion created by citizens on Sep 24, 2010
Latest reply on Sep 27, 2010 by citizens
OnLoad I programmatically create two (2) combined FilteringSelect menus:

The first filters the seceond.

new dijit.form.FilteringSelect({store: new{data: claimsYearJson}),
autoComplete: true,
style: "width: 95px;",
id: "yearOf",
onChange: function(yearOf){dijit.byId('stormName').query.yearOf = yearOf;}}, "yearOf");
new dijit.form.FilteringSelect({store: new{data: claimsStormNameJson}),
autoComplete: true,
query: {yearOf: "*"},
style: "width: 155px;",
id: "stormName"
}, "stormName");

This works great as a means to set my Feature Layer selection On Demand.

However, another component of my application programmatically changes the "displayedValue" of the menus upon user click, which works as expected.

What doesn't work is that when the 'displayedValue' is changed progammatically the second menu displays an erroneous message saying, "The Value Entered Is Not Valid."

I believe this is because while the 'displayedValue' values have been changed the filtering query of the first is not fired off (onChange) because this is done programmatically and hence it sees a new value in the menu that does not match the most recent manual onChange query results.

Does anyone know how to programmatically fire off the onChange event?