PDA

View Full Version : [CLOSED] Records are not displaying as per pagesize in grid panel



alscg
Apr 04, 2013, 7:20 AM
Hi,

We are using ext.net gridpanel with paging.
If gridpanel have 10 records and pagesize is 1 then 2 records are displaying per page in grid. Grid should display records as per pagesize.
Also, after changing page, last record on last page is displaying as first record on current page.
However, on 'examples.ext.net' website this issue doesn't appear.
We have updated source code and tested it, but still issue is there.
Please provide solution to this issue.

Thanks,
alscg

Daniil
Apr 04, 2013, 8:53 AM
Hi @alscg,

Thank you for the report.

I discovered this issue yesterday and we are working on it.

Daniil
Apr 04, 2013, 9:32 AM
For now please use the following fix.

Fix

Ext.data.PagingStore.override({
applyPaging : function () {
var start = (this.currentPage - 1) * this.pageSize,
limit = this.pageSize;

var allData = this.data,
data = new Ext.util.MixedCollection({
getKey: Ext.data.Store.recordIdFn,
maintainIndices: true
});

data.pageSize = this.pageSize;

if (start >= allData.getCount()) {
start = this.start = 0;
}

data.addAll(allData.getRange(start, start + limit - 1));
this.allData = allData;
this.data = data;
}
});

Daniil
Apr 04, 2013, 9:54 AM
We committed the fix to SVN. Please update.