Я бы хотел, чтобы фильтры сохранялись на сетке на странице обновления. Можете ли вы, пожалуйста, направить меня на это.сохраняющиеся фильтры в панели сетки
Спасибо.
Вот код, который отправить данные фильтра для WebService
Ext.extend(Ext.ux.AspWebServiceProxy, Ext.data.DataProxy,
{
load: function(params, reader, callback, scope, arg) {
var userContext = {
callback: callback,
reader: reader,
arg: arg,
scope: scope
};
var proxyWrapper = this;
//debugger;
//Handles the response we get back from the web service call
var webServiceCallback = function(response, context, methodName) {
proxyWrapper.loadResponse(response, userContext, methodName);
}
var serviceParams = [];
var filters = {};
//Convert the params into an array of values so that they can be used in the call (note assumes that the properties on the object are in the correct order)
for (var property in params) {
if (property.indexOf("filter[") == 0) {
filters[property] = params[property];
}
else {
serviceParams.push(params[property]);
}
//console.log("Property: ", property, "Value: ", params[property]);
}
serviceParams.push(filters);
//Add the webservice callback handlers
serviceParams.push(webServiceCallback);
serviceParams.push(this.handleErrorResponse);
//Make the actual ASP.Net web service call
this.webServiceProxyMethod.apply(this.webServiceProxy, serviceParams);
},
handleErrorResponse: function(response, userContext, methodName) {
window.location.reload();
// Ext.MessageBox.show({
// title: 'Error',
// msg: response.get_message(),
// buttons: Ext.MessageBox.OK,
// icon: Ext.MessageBox.ERROR
// });
//alert("Error while calling method: " + methodName + "n" + response.get_message());
},
loadResponse: function(response, userContext, methodName) {
var result = userContext.reader.readRecords(response);
userContext.callback.call(userContext.scope, result, userContext.arg, true);
}
});
Внешнее man man включен. Проблема заключается в том, что панель решетки показывает, что фильтры проверены и данные внутри нее (текстовое поле) также сохраняются, но проблема в том, что я не вижу отфильтрованную сетку, когда обновляется clcik. Не могли бы вы помочь мне в этом. – xrx215
Возможно, вам потребуется вручную перезагрузить хранилище, когда состояние будет восстановлено. Поместите некоторый код, чтобы мы могли воспроизвести его. –
вы можете увидеть опубликованный код и помочь мне оттуда. – xrx215