PDA

View Full Version : Combo - valueField set to null if the record doesn´t exist in my store



mvosantos
25 Apr 2012, 9:55 AM
Hi guys.
I have a combo that is getting the records from an ajax proxy.
What I wanna do:
If I look for a record that does not exist in my table, I want to set the valueField property to null, so if I try to post the form, it will not be sent...even if what I wrote in the field still there.

I tried to return an empty json, but I got no success.

scottmartin
25 Apr 2012, 6:33 PM
You could check your value and use the following to clear your combo?
combo.setValue(null);

Regards,
Scott.

mvosantos
26 Apr 2012, 4:08 AM
To check the value, I would have to check on my database again, correct?
If so, isn´t there another way?

scottmartin
26 Apr 2012, 4:31 AM
I thought you were doing this already .. .Perhaps I did not understand. Please explain your process by steps.

Regards,
Scott.