jQWidgets Forums
jQuery UI Widgets › Forums › Grid › How to customize footer in jqxgrid?
This topic contains 6 replies, has 2 voices, and was last updated by Vardhman Jain 10 years, 8 months ago.
-
Author
-
Hi ,
I am using jqxgrid for my application.However,as per our requirements we need to customize the footer options in jqxgrid.Actually,what we need is the combination of both default and simple mode provided in jqxgrid features.Going specifically,the default mode is fine for us except it doesnt provide first -last traversal option.So,is there a way we can achieve the combined functionility using some other feature or possibly some later version if required?Hi Vardhman Jain,
To achieve what you need, you will need to implement the pagerrenderer callback and build your custom UI. Ex: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/custompager.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks for suggesting solution Peter. But I want code for “First” and “Last” pages in the grid. As you suggested, we tried implementation with pagerrenderer. But it is not working. Could you please give us code snippet for “First” and “Last” feature implementation in the grid.
Thanks & Regards,
Vardhman JainHi Vardhman Jain,
You can use the Grid’s “gotopage” method to navigate to a given page. The argument which you should pass when you call this method is the page’s number. “gotopage” with parameter 0 will navigate to the first page. The last page’s number is equal to pages’s count – 1 and the page’s count can be retrieve from the “getpaginginformation” method.
var paginginformation = $('#jqxGrid').jqxGrid('getpaginginformation'); // The page's number. var pagenum = paginginformation.pagenum; // The page's size. var pagesize = paginginformation.pagesize; // The number of all pages. var pagescount = paginginformation.pagescount;
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for your solution. Now we are getting correct page indexing. But one more issue we are facing that when tries to load last record page refreshes with Grid’s “gotopage” method and it takes again to first page only.
But we need it to go on last page without page refreshes. So is it possible without refreshing page?Thanks in Advance.
VardhmanHi Vardhman,
Calling the “gotopage” method with correct index as passed argument will navigate to the page that corresponds to the passed index. Example: http://jsfiddle.net/jqwidgets/xotv9d53/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Thanks for the solution.It is working fine for me now.
Regards,
Vardhman Jain -
AuthorPosts
You must be logged in to reply to this topic.