PDA

View Full Version : combo deselect event



papaja
2 Apr 2012, 4:45 AM
I filter grid on combo select event. However when I delete everything from combo field and "tab" away, nothing happens. Select event is not trigered which is not big surprise. Still, I need to execute same function when user empties combo text field.

I tried using change event, but it is fired to often, and not useful because filter makes sense only when value is selected.

Is there something like "deselect" event for combo field?

skirtle
2 Apr 2012, 5:42 AM
In your case you could use the blur event.

Generally in a scenario like this I'd use the change event. To get around the problem of it firing too often I'd just compare the current value to the values in the store and only filter the grid if it's a valid value.