View Full Version : ComboBox Query Question

15 Apr 2009, 10:28 AM
I have a form which displays a ComboBox. The ComboBox is associated with a remote data store. The combo box is supposed to query the store for a set of records which are available in the current editing context. It's possible that no records will be returned. If no records are returned, I want to disable/change some fields on my form. I've come up with a way to deal with this situation by using a customized Store which fires an event when the query yields no results, but I'm wondering if there is a better way to deal with this situation.

I've looked at the various events available to ComboBox and I'm not seeing one that would help. What I think I want (but I'm open to other ideas) is to somehow know when the combo box query has completed so I can see if it has returned any records. If there aren't any records, I could adjust my form fields accordingly.

Can anyone offer any suggestions (or pointers to existing threads which might be of help?)



15 Apr 2009, 10:35 AM
Add handlers for the combo's store load (and loadexception) events so you can tell what the store got back. Also read the grid FAQ as there are probably a number of things regarding retrieval you may find helpful. http://extjs.com/learn/Ext_FAQ_Grid

17 Apr 2009, 6:30 AM
Thanks, worked great!