-
16 Nov 2010 5:59 AM #1
Grid Paging Toolbar problem
Grid Paging Toolbar problem
Hi,
I am getting paging issue when i delete the final record from last page, how can i resolve the paging issue, pls view the screen shot which i have attached.
http://www.freeimagehosting.net/uploads/7a38bace38.jpg
In Store save event(insert,update or delete) i will reload the store for update the grid for remote sort. like this
firstGridreader= new Ext.data.JsonReader({ root: 'res', id: 'HJid', idProperty: 'DefIndex', totalProperty: 'totalCount', successProperty: 'success', messageProperty: 'message', fields: fields }), var fGridStore = new Ext.data.Store({
proxy:ApGrpFGrdProxy,
autoLoad :false,
autoSave:false,
idProperty:'airBasicIndex',
baseParams:{start:0, limit:25},
reader:firstGridreader,
writer: fssuperGrdWriter,
listeners:{
save :function ( St, records, options ){
St.reload();
}
},
remoteSort:true
});
In Grid..
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: fGridStore,
displayInfo: true,
emptyMsg: "No records to display"
}),
if you view my screen shot.. 5 of 4 will be displayed .it happens when i delete the final record(or entire records) in last page after store reloads it show like 5 of 4 .
total page is updated as 4 since there is only 4 pages but its staying in the 5 page
how can i handle this problem or iam making any mistake or
how can i move to the previous page when i delete the final record in the last page.
Thanks in advance
-
17 Jan 2011 10:15 PM #2
Try this thread solution...
http://www.sencha.com/forum/showthre...r+total+update
Also, I would check the data for empty set and if true, move to the previous page...
Look at PagingToolbar.movePrevious()Last edited by lorezyra; 17 Jan 2011 at 10:20 PM. Reason: More specfic to OP's question
Perfection as a goal is a nice idea that can point one in a specific direction. However, since "perfection" is an ever changing (evolving?) and moving target, one must admit that perfection can never be obtained...
When in doubt, check the d4mn source code!
Similar Threads
-
Problem with paging toolbar when grid is refreshed
By salvin18 in forum Community DiscussionReplies: 5Last Post: 30 Jul 2010, 12:54 AM -
Problem with Paging toolbar
By maren in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 11 Aug 2009, 4:18 AM -
paging toolbar problem
By wicrosoft in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 20 Oct 2008, 3:51 AM -
Paging toolbar problem
By morange in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 28 Jun 2008, 4:09 AM -
i have problem with Paging toolbar with grid panel
By Jigesh Shah in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 21 Apr 2008, 6:55 PM


Reply With Quote