View Full Version : reusing filtered store for combo

17 Jun 2010, 3:40 AM
I have a column in an editorgrid in which I use a store to render the values.
I would like to use the same store (but filtered) store for the field editor combo.

Below is the code that I have now.
The problem is that although when i lood at it in debugger lifecycle_combo.store appears to be filtered when I click on the combo all the values appear.

Thanks for the help.

var lifecycle_combo = new Ext.form.ComboBox( {
typeAhead : true,
mode : 'local',
triggerAction : 'all',
valueField : 'value',
lazyRender : true,
displayField : 'text',
store : ref_lifecycle_store,
lastQuery: ''
var regexp = new RegExp('some filter');
lifecycle_combo.store.filter("value", regexp);

var columns = [ usergrid_sm, usergrid_rowActions, {
"id" : "ref_lifecycle",
"dataIndex" : "ref_lifecycle",
"header" : T("ref_lifecycle"),
"hidden" : false,
"hideable" : true,
renderer : function(value) {
return ref_lifecycle_store.getById(value).data.text;
editor : lifecycle_combo