This question is locked. New answers and comments are not allowed.
I would like an additional pager to the grid - not necessarily located next to the grid.
In particular I would like to add an additional next and previous button to the page. Are there any methods on the Grid that I can call to move to the next/previous page when using ajax paging?
In particular I would like to add an additional next and previous button to the page. Are there any methods on the Grid that I can call to move to the next/previous page when using ajax paging?
4 Answers, 1 is accepted
0
Hello Ryan,
You have two options - either to delegate clicks to the grid or to use the client-side API. Delegating clicks is really short and (in my opinion) easier to maintain, so here it is:
// previous
$("#YourPrevButton")
.click(function(e) {
e.preventDefault();
$("#GridName .t-pager .t-arrow-prev").trigger("click"); // delegate click
});
// next
$("#YourNextButton")
.click(function(e) {
e.preventDefault();
$("#GridName .t-pager .t-arrow-next").trigger("click"); // delegate click
});
Greetings,
Alex Gyoshev
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.
You have two options - either to delegate clicks to the grid or to use the client-side API. Delegating clicks is really short and (in my opinion) easier to maintain, so here it is:
// previous
$("#YourPrevButton")
.click(function(e) {
e.preventDefault();
$("#GridName .t-pager .t-arrow-prev").trigger("click"); // delegate click
});
// next
$("#YourNextButton")
.click(function(e) {
e.preventDefault();
$("#GridName .t-pager .t-arrow-next").trigger("click"); // delegate click
});
Greetings,
Alex Gyoshev
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
Ryan
Top achievements
Rank 1
answered on 16 Mar 2010, 09:22 AM
Hi Alex,
thanks for the reply,
I am interested in using the client api as well, can you tell me what method i could use.
The docs mention
thanks
Ryan
thanks for the reply,
I am interested in using the client api as well, can you tell me what method i could use.
The docs mention
grid.dataBind(data);
grid.ajaxRequest();however i'm unsure which one would achieve the paging functiongrid.rebind();
thanks
Ryan
0
Accepted
Hello Ryan,
Sure!
grid.pageTo(pageNumber);
Greetings,
Alex Gyoshev
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.
Sure!
grid.pageTo(pageNumber);
Greetings,
Alex Gyoshev
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
Ryan
Top achievements
Rank 1
answered on 16 Mar 2010, 09:31 AM
Awesome!!
Thanks :-)
Thanks :-)