PDA

View Full Version : Paginated GridPanel header column mutiple filter on same column



dkumavat
15 Oct 2013, 8:34 AM
Hi, I have Paginated Grid Panel with few columns and on a header column I have remote combo with filtering working fine.Also if I remove remote combo filtering then I can able to filter like simple search filtering.
Now I want both this filter on this column so user should be able to filter using either remote combo or simple search.

On "Prize" column I need to add another filter for simple search. Please guide.

My code for reference.

Ext.define('IWE.view.winner.WinnerList', {
extend: 'IWE.widgets.PaginatedGridPanel',
alias: 'widget.winnerlist',
title: 'Winners',
store: 'Winners',
features : [{ftype : 'filters', encode : true}],
frame: true,

initComponent: function() {
this.columns = [
{header: 'Email', dataIndex: 'userData.userDetailData.email', filterable: true, width: 200,
renderer: function(value, metaData, record, rowIndex, colIndex, store) {
return '<font color="blue" style="text-decoration: underline;">'+value+'</font>'
}}
,{header: 'Prize', dataIndex: 'prizeData.name', width: 200, filterable: true,
filter: {
type:'remote',
url: pch.iwe.contextRoot + '/prize/listAll.htm?alt=json',
root: 'prizes',
model: 'IWE.model.Prize',
filterOn: 'prizeData.id'

}
,renderer: function(value, metaData, record, rowIndex, colIndex, store) {
var start = new Date(record.data['prizeData.giveawayData.startDate']);
var end = new Date(record.data['prizeData.giveawayData.endDate']);
return '<font color="blue" style="text-decoration: underline;">' +
value + ' (' + Ext.Date.format(start, 'm/d/y') + ' - ' +
Ext.Date.format(end, 'm/d/y') + ')</font>';
}}
,{header: 'Certificate', dataIndex: 'certificateValue', filterable: true, width: 125}
...........
...........

Gary Schlosberg
21 Oct 2013, 10:21 AM
I don't believe you can associate multiple filters on one grid column. Are you needing both to be applying their filters at the same time?

dkumavat
21 Oct 2013, 10:38 AM
Thanks Gary for reply.
I don't need both the filters applying at the same time but one at a time.
Either remote combo filter or simple search filter. So user will have both the options available to choose from for that column depending on his filtering need.

Is this possible? I would appreciate your help.