PDA

View Full Version : [CLOSED] How to get current the PageIndex?



blueworld
Mar 28, 2013, 10:35 AM
Hi,

I have a grid that uses paging. I have a combobox that allows the user to change the pagesize. If the user increases the pagesize, I want to start at the same position as before.
For example, if I have 400 records and a pagesize of 50. The user wants to see record 199, so he is on page 4 right now.
Now he changes the pagesize to 100, if the store reloads he should be at page 2 in order to see record 199

So I need the current pageIndex for my calculation.

As I see in the changelog, .PageIndex has been removed but now there are only Set-Methods.

Regards

Daniil
Mar 28, 2013, 10:50 AM
Hi @blueworld,

You can get it on client side.


var pt = App.GridPanel1.getDockedItems("pagingtoolbar")[0];

pt.getPageData().currentPage


and send to a server as a request's parameter.

blueworld
Mar 28, 2013, 11:04 AM
Thank you Daniil, this works fine