6 Oct 2012 4:26 AM #1
pagination for dynamic grid
I have facing issue in Pagination of a grid having dynamic url to load the grid.
I have to populate the grid based on some filter condition that i am passing to server through url.
For first page in pagination it is giving me the correct no of records in the page as per my limit.
But after clicking next(>) in the pagination bar the parameters are passing null and fetching all values as per my DB design.
How i will apply my pagination here for the ulr?
6 Oct 2012 10:06 AM #2
Can you provide more info about your dynamic url and what is send in the header?
The params should be sent each time based on your config.
6 Oct 2012 10:15 AM #3
By 'dynamic URL' do you just mean request parameters? If you do then you can either use extraParams:
or add the parameters in a beforeload listener:
6 Oct 2012 9:29 PM #4
Actually i have some filter condition and on click of a button i hav to get the grid store based on the filter conditions with pagination.
So for that i have loaded the store on the click action of the button.
params :<some parameter to pass trough url to server for the store to populate>
Then i have the pagination toolbar in my grid. and in the store i have simply mentioned pageSize:100,
so after some fight i saw that for first page in the pagination it's all coming right but when i am clicking the next button/ refresh button present in pagination all the parameters going are null except the start and limit parameter that is for pagination.
for first time the url is like:
but after clicking next in pagination:
****NOTE.I have not given the exact url as of now as i am unable to remember that one and don't have the codes with me for today.. my url just looks like that. In my next replay i can give the my code with the exact url.
6 Oct 2012 9:41 PM #5
I tried as u said but did not get the right way how to do that.
actually in controller i am loading the grid store on click action of a button and passing the params through the url in that function of controller.I have the parameter variables in the controller.can u give some code base/any good link so that i can know how to apply that one.
i am doing the bellow thing inside click event of a button:
7 Oct 2012 3:28 AM #6
7 Oct 2012 6:52 AM #7
21 Dec 2012 9:02 AM #8
@sencha.user. This thread had nothing to do with the DynamicGrid extension. It was a question about a dynamic URL, not dynamic fields. Do not hijack other people's threads.
From a quick read of those other threads it appears that you have misunderstood the purpose of totalProperty. It does not cut up a response into pages, it just allows the paging mechanism to know how many pages they are. Responsibility for ensuring that the paging parameters are respected lies with your server.
I suggest you spend some time learning how to use a normal grid before you embark on trying to do complicated things with a DynamicGrid.