This is a migrated thread and some comments may be shown as answers.
pageTo - max number of pages
3 Answers 30 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lawrence
Top achievements
Rank 1
Lawrence asked on 17 Jun 2010, 12:12 PM
I'm attempting to programmatically force a Telerik grid to page.  This is easy using the pageTo() method, however I can't seem to find the maximum number of pages available.  If I don't know this, I could end up off the end of the page.

In the Client API documentation (http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api.html) is states:

  pageTo - pages the grid to the specified page number. The page number must be valid - within the range of available pages.

However, how do I find out the range of available pages?

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 17 Jun 2010, 12:14 PM
Hi Lawrence,

You can try this

var total pages = grid.totalPages(grid.total);

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lawrence
Top achievements
Rank 1
answered on 17 Jun 2010, 12:17 PM
Thanks Atanas, that's exactly what I needed!
0
Avdut
Top achievements
Rank 1
answered on 17 Jan 2011, 09:32 PM
The PageTo() method is throwing an error when used in page......
Tags
Grid
Asked by
Lawrence
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Lawrence
Top achievements
Rank 1
Avdut
Top achievements
Rank 1
Share this question
or