I'm calling a page containing a data pager. Part of my initial call url is a page number I would like to go to.
I searched around and tried a lot of things without success:
- FireCommand
- SEO Paging
What is the designed way to specify a start page for a data pager?
THANKS!
2 Answers, 1 is accepted
0
Angel Petrov
Telerik team
answered on 19 Aug 2014, 11:07 AM
Hi Jens,
I have already provided an answer in the official support ticket you have opened regarding this matter. In order to avoid duplicate posts I would kindly like to ask you to post your queries there. Later you can share your findings here so other community members can benefit from them.
Regards,
Angel Petrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I finally solved it! It turned out to be quite tricky as I had some dependencies on the current page that where not satisfied when using FireCommand - it was simply to late when fired.
So the correct approach and only way to set the initial start page, is to use FireCommand within OnPreRenderComplete:
In case OnPreRenderComplete is to late - i.e. data bindings on some other controls that would need the current page, it would be important to decouple it from RadDataPager.CurrentPageIndex and set a global variable for it. So you have the page either from the URL or in case of a post back the pager control itself.