I have a combobox like http://jsfiddle.net/8jnRR/
Here is my store
var stored = new Ext.data.SimpleStore({
fields: [ "value", "text" ],
data: [
[ 0, "Online0" ],
[ 1, "Online1" ],
[ 2, "Online2" ]
,[ 100, "Hide" ] // how to hide this item
]
});
I want to hide a item has value is 100 above. How to do that, thanks so much
Take a look at this modified fiddle http://jsfiddle.net/jdflores/8jnRR/1/ It uses the store's filters config. I'm including a function that determines if the record.data.value is less than 100:
filters: [function(record, id){
return (record.data.value < 100);
}],
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With