This is a migrated thread and some comments may be shown as answers.

First and Last pager buttons plugin is here

0 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 06 Jun 2012, 02:08 PM
Hi everybody!

Our customers asked us to make First and Last buttons to navigate through the grid pages. So I made this plugin.
I don't know if there is any other way to share kendo plugins, so I'll just place it here.

/*
* Ivelum 2012
* Alexander Skogorev
* Adds 'First' and 'Last' buttons to the pager
*/
(function(a,b){function f(a,b,d,e){return a({idx:b,text:d,ns:c.ns,numeric:e})}var c=window.kendo,d=c.ui,e=d.Pager;var g=e.extend({refresh:function(){var a=this,b,c=1,d,g=a.page(),h=a.totalPages(),i=a.linkTemplate,j=a.options.buttonCount;e.fn.refresh.call(a);if(g>j){d=g%j;c=d===0?g-j+1:g-d+1}b=Math.min(c+j-1,h);if(c>1){a.list.prepend(f(i,1,"First",false))}if(b<h){a.list.append(f(i,h,"Last",false))}}});d.plugin(g)})(jQuery)

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Alexander
Top achievements
Rank 1
Share this question
or