1
我正在嘗試將過濾添加到簡單的ExtJS 5網格中。我正在使用安裝提供的一個簡單的例子,看起來它工作正常,除了在IE中,當我嘗試過濾所有記錄被擦除。ExtJS 5 IE9中的網格過濾和排序中斷
有沒有人看過這個問題?這是我正在使用的代碼。
`$( 「#SearchEmployees」)點擊(函數(){
var criteria = $("#employeeName").val();
if (criteria == '' || criteria == null) {
alert("Please apply search criteria.");
return;
}
var baseurl = $("#hdnUrlSearch").val();
var data = (function() {
$("#employeesSearchGrid").empty();
$.ajax({
type: "POST",
url: baseurl,
dataType: "json",
data: { employeeName: criteria },
async: false
}).done(function (retData) {
data = retData;
}).fail(function (xhr) {
alert(xhr.responseText);
});
return data;
})();
Ext.define('EmployeeSearch', {
extend: 'Ext.data.Model',
fields: [
'FullName',
'DepartmentName',
'PhoneNumber',
'EmailAddr'
]
});
var store = Ext.create('Ext.data.Store', {
model: 'EmployeeSearch',
proxy: {
type: 'ajax'
},
data: data
});
var grid = Ext.create('Ext.grid.Panel', {
store: store,
forceFit: true,
columns: [{
header: 'Name',
dataIndex: 'FullName',
flex: 1,
filter: 'string',
width: 440
}, {
header: 'Department',
dataIndex: 'DepartmentName',
filter: 'string',
flex: 1,
width: 200
}, {
header: 'Direct Phone',
dataIndex: 'PhoneNumber',
filter: 'string',
flex: 1,
width: 240
}, {
header: 'Notification Email',
dataIndex: 'EmailAddr',
flex: 1,
filter: 'string'
}],
renderTo: 'employeesSearchGrid',
frame: true,
plugins: ['gridfilters']
});
});`