필터를 내 표에 적용하려고했지만이를 수행 할 수 없습니다. Extjs에 익숙하지 않아서 해결하도록 도와주세요.필터가 그리드에 표시되지 않습니다.
내가 이것을 실행 엽차 바이올린을 사용하고 난 그리드에 필터를 impement하는 로 "기능 : [필터]"시도 할 때
이 또한
Ext.require([
'Ext.grid.*',
'Ext.data.*',
'Ext.ux.grid.FiltersFeature',
'Ext.toolbar.Paging']);
filters = {
ftype: 'filters',
encode: encode,
local: local,
filters: [{
type: 'numeric',
dataIndex: 'Id'
}, {
type: 'string',
dataIndex: 'fname'
}, {
type: 'string',
dataIndex: 'lname'
}, {
type: 'date',
dataIndex: 'date'
},{
type: 'numeric',
dataIndex: 'age'
},/*{
type: 'string',
dataIndex: 'genderId'
}*/,{
type: 'string',
dataIndex: 'email'
},{
type: 'numeric',
dataIndex: 'phone'
}]
};
을 바라하시기 바랍니다 // 그리드
title : 'Employee table',
xtype : 'grid',
stripRows : true,
columnLines : true,
store : Ext.data.StoreManager.lookup('employeeStore'),
width :'100%',
features : [filters]
columns:
[
{
header : 'ID', dataIndex: 'Id', flex:0.5 ,filterable: true,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'First Name', dataIndex: 'fname', flex:1 ,sortable : false,filterable: true,
filter:
{
type: 'string'
},
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Last Name', dataIndex: 'lname', flex:1,filterable: true,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'DOB', dataIndex: 'date', flex:1,filterable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'),
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Gender', dataIndex: 'genderId', flex:0.5,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Age', dataIndex: 'age', flex:0.5,filterable: true,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Country', dataIndex: 'country', flex:1,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Email', dataIndex: 'email', flex:2,filterable: true,
editor:
{
xtype: 'textfield',
allowBlank: false
}
},
{
header : 'Phone', dataIndex: 'phone', flex:1,filterable: true,
editor:
{
xtype: 'textfield',
allowBlank: false
}
}
],
일부 자료가 누락 링크에 보이는 당신이 응용 프로그램의 새로 고침을 할 수 있으며, 다시 시도하십시오. – UDID
Ext.ux.grid.FiltersFeature에이 파일이 있는지 여부를 확인 했습니까? 또한 어떤 Ext JS 버전을 사용하고 있습니까? –
예 플러그인이 존재하고 4.2.1 버전을 사용 중입니다 –