View Full Version : in grid view after sort Show Page on which record was selected before

7 Mar 2014, 2:52 AM
Hi all,
I need help in grid panel, i have 10 pages and i want to show the page of previously selected record after sort
my code is :

Ext.define('Usr.view.GridView', {
extend: 'Ext.grid.Panel',
anchor: '100% 100%',
border: false,
cls: 'grid-class',

initComponent: function () {
Ext.apply(this, {
//plugins: [this.rowEditing],
selType: 'rowmodel',
selModel: {
mode: 'MULTI'
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
padding: 0,
items: [{ xtype: 'pagingtoolbar', store: this.store, displayInfo: true, dock: 'bottom', text: 'Add', scope: this,handler: this.onAddClick, width: '100%', border: 0 }]

Thanks & Regards,

7 Mar 2014, 6:53 AM
So you want to find an item that was on page5, but after a re-sort, it now be on page3 and you want to load that page with the item selected?

I would say that you would need to determine the new page location at the server level based on your page size and record index for the item and return that page number for it to be loaded.

9 Mar 2014, 10:50 PM
okay, i will try for it, thanks