I seem to have solved my own problem. In the HTTPService definitions, I was defining a result="purchaseService.send()" call to refresh the grid. Given that the combo boxes won't be updating except for the first time, I've removed the result event and that seems to have done the trick.
Blake -----Original Message----- From: Blake Kadatz [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 3:41 PM To: [email protected] Subject: [flexcoders] Updating datagrid using dynamic combo boxes Hi, In my application I have three combo boxes which act as a filter for a datagrid. For example, I have: Customer: Sales rep: Country: ____________ _____________ _________________ |__________|_| |___________|_| |_______________|_| ________________________________________________________ | | | ... Datagrid of customer purchases here ... | The datagrid and all combo boxes are populated dynamically from HTTPServices. When the user chooses a different country, for example, I want to show all purchases from that country which also match the currently selected customer and sales rep. So I've defined them as such: <mx:ComboBox id="customer_combo" change="purchaseService.send()" labelField="company_name" dataProvider="{customerService.result.customers.customer}"> </mx:ComboBox> The others are defined similarly. When my app initializes, I call: customerService.send() to populate the list of customers. The problem is that the change event fires from the init routine, which then triggers the datagrid to refresh. If all three combo boxes do this, then it's grabbing the data three times from the server when it should only be doing one query. After it initializes, it's not a problem, but I just want to avoid three (possibly lengthy) database fetches at the start. Any ideas on a cleaner way to do this? Perhaps it's possible to set the change event for each after the initial send() completes or disable the event until then? Or have I missed something totally obvious? :) Thanks, Blake Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

