私はExtJs 4.2を使用していますが、Ext.grid.Panelを持っていますが、データが入っていますが、真に1つのフィールドに真の値を持つブール値フラグに基づいて、次に別のフィールドの場合は、両方のフィールドでfalseがfalseになります。これまで私はソーターを以下のように編集しています。ExtJsグリッドの行を並べ替えたいですか?
me.requesterListStore = new Ext.create('Ext.data.Store', {
id: 'requesterListStore',
model: 'Connex.Request.Model.RequesterModel',
buffered: true,
pageSize: 100,
leadingBufferZone: 50,
autoLoad: false,
remoteFilter: false,
purgePageCount: 5,
remoteSort: false,
sortOnLoad: true,
sorters: [
{
property: 'isSmartIndexed',
direction: 'DESC'
},
{
property: 'isAutoIndexed',
direction: 'DESC'
}
],
proxy: {
type: 'ajax',
url: $context + 'services/requester/search',
actionMethods: {
read: 'POST'
},
doRequest: function (operation, callback, scope) {
var writer = this.getWriter(),
request = this.buildRequest(operation, callback, scope);
if (operation.allowWrite()) {
request = writer.write(request);
}
Ext.apply(request, {
headers: this.headers,
timeout: this.timeout,
scope: this,
callback: this.createRequestCallback(request, operation, callback, scope),
method: this.getMethod(request),
jsonData: this.jsonData,
disableCaching: false // explicitly set it to false, ServerProxy handles caching
});
Ext.Ajax.request(request);
return request;
},
reader: {
type: 'json',
root: 'content',
totalProperty: 'total',
idProperty: 'id'
},
writer: {
writer: new Ext.data.JsonWriter({
getRecordData: function (record) {
return record.data;
}
})
}
}
});
グリッドは店舗に接続されていますか?ストアはバッファリングされていますか? –
申し訳ありませんが、グリッドが店舗に接続されています。ストアはBuffered:trueに設定されます。 –
あなたの並べ替えはグリッドに保存されていません –