PDA

View Full Version : Grid issues: cannot have Lock and Filter at the same time



philance
27 Mar 2012, 7:29 PM
Dear Bros,

I am implementing the grid with Lock and Filter features. However, I can make the grid works with either of them, but not with both of them at the same time.

border : false,
id : 'jobloglistgrid',
xtype : 'grid',
selType : 'rowmodel', //can be cellmodel too
features: [{
ftype: 'filters',
encode: true, // json encode the filter query
filters: [
{
type: 'string',
dataIndex: 'visible'
}
]
}],
store : joblogstore,
listeners: {
selectionchange: function(sm, selections) {
this.up('window').down('#jobloglistremovebtn').setDisabled(selections.length == 0);
this.up('window').down('#jobloglisteditbtn').setDisabled(selections.length == 0);
if(selections.length > 0)
joblogid = selections[0].data.id;
}
},
columns : [
new Ext.grid.RowNumberer(),
{text:'ID',hidden:true,sortable:true,filterable:false,dataIndex:'id'},
{id:'CUSTOMERREF',header: "Customer Ref", hidden:true, width: 80, sortable: true, dataIndex: 'CUSTOMERREF'},
{id:'REFNO',header: "Ref No", width:220, sortable: true, locked:true, dataIndex: 'REFNO',filter:{type: 'string'}},
{id:'NAME',header: "Customer Name", width: 250, sortable: true, dataIndex: 'NAME',filter:{type: 'string'}},
{id:'FULLNAME',header: "Engineer", width: 150, sortable: true, dataIndex: 'FULLNAME',filter:{type: 'string'}}
......

]
}
]

Is this a bug in current Extjs4 version or is there a bug in my code. Please help.

thank you very much in advance.

mitchellsimoens
28 Mar 2012, 7:06 AM
Not a bug at all. Just not currently supported. The issue with some things not working with locked columns is you then have 2 grids in an hbox layout so things need to span two grids.

philance
30 Mar 2012, 2:44 PM
mitchellsimoens, thx for your reply

btw, I still not very clear about your answer. So is there any work around to make it work?

mitchellsimoens
30 Mar 2012, 2:50 PM
4.1.0 RC2 is going to be coming real soon. You should take a look at it :)

philance
31 Mar 2012, 1:35 AM
wow, that's great ... looking forward for that =P~ ... thx a lot for fast response

crocop21
28 Aug 2012, 10:42 AM
Still not suported? even in 4.1.1 ? thanks..

jjrichie
12 Sep 2012, 12:10 AM
Hey Mitch,

Seems this isnt done yet ??!!

I am able to lock the grid and filter the data, however couldnt reset the filter :(

scottmartin
13 Sep 2012, 11:08 AM
This has been pushed back to 4.1.3 at this time.

Scott.

Sabareesh
13 Mar 2014, 11:02 AM
I am currently using version 4.2 , im using grid lock and filters . The issue is , filters appear only for the locked columns , but for other column filters are not appearing even though i have specified.Any help ?


Thanks in advance
Sabareesh

Dafram
19 Aug 2014, 5:34 AM
Hi!

use:

myGrid.normalGrid.filters.clearFilters();
myGrid.lockedGrid.filters.clearFilters();

instead of:

myGrid.filters.clearFilters();

Hope it helps!