Remote Filtering With Listfilter In Extjs Grid Column Header
I am using ListFilter plugin to filter results on a Grid panel. The column definition is. { header: 'Provider', filter: { type: 'list', store: Ext.getStore(
Solution 1:
I didn't tried this myself but you need to set the ID manually with the idField
property [new to ExtJS4.1.3] which is per default set to id
. So I guess this will work:
{
header: 'Provider',
filter: {
type: 'list',
idField: 'provider_id',
store: Ext.getStore('MyApp.store.Provider'),
dataIndex: 'provider_id',
labelField: 'name'
}
}
Update
OK, I looked at the source and I can now tell you that this is the answer. So will have to either live with your workarround until 4.2 is out or you can apply the following changes to your Ext.ux.grid.menu.ListMenu
to make it run:
add the idField
with a default value.
look within the constructor for this lines
case 'object': options.push([value.id, value[this.labelField]]); break;
// some more lines
fields: ['id', this.labelField],
and replace it with
case'object': options.push([value[me.idField], value[me.labelField]]); break;
// some more lines
fields: [me.idField, me.labelField],
and within the onLoad function look for
itemValue = records[i].get('id');
and replace it with
itemValue = records[i].get(me.idField);
and that pretty much is it.
Post a Comment for "Remote Filtering With Listfilter In Extjs Grid Column Header"