jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Pagination not working
Tagged: Pagination
This topic contains 2 replies, has 2 voices, and was last updated by Peter Stoev 12 years, 1 month ago.
-
AuthorPagination not working Posts
-
Hi
Pagination is not working when i click next pagination grid is not getting load .
please give me the solution
Here with i have attached code.
var source = { datatype: "json", type:"POST", datafields: [{name:'id'},{name:'firstname'},{name:'lastname'} ,{name:'email'},{name:'company'},{name:'last_updated'}, {name:'name'},{name:'idgroup'}], id: 'id', root: 'Rows', processdata: function (data) { data.id_user=$("#group_list").val(), data.search_oper='cn'; data.searchField=searchstring; data.searchString=searchvalues; data.sup_list_id=sup_list_id; data.fields='id,firstname,lastname,email1,company,last_updated,id_group'; }, sort: function() { // update the grid and send a request to the server. $("#jqxgrid").jqxGrid('updatebounddata'); }, root: 'Rows', beforeprocessing: function(data) { if (data != null) { source.totalrecords = data.TotalRows; } }, url: 'index.php?module=Suppression&action=manageSupContacts' }; var dataAdapter = new $.jqx.dataAdapter(source); jQuery("#jqxgrid").jqxGrid({ width:'100%', source: dataAdapter, pageable:true, virtualmode: true, selectionmode: 'singlecell', // showfilterrow: true, sortable:true, autoheight: true, mtype:'POST', columnsresize:true, columnsreorder: true, pagesize: {/literal}{$userGridRowPerPage}{literal}, pagesizeoptions: {/literal}{$userGridPagination}{literal}, columnsreorder: true, ready: function(){ $("#jqxgrid").bind('cellselect', function (event) { selectedrow = event.args.rowindex; }); }, rendergridrows: function(params) { return dataAdapter.records; }, columns:[ { text: 'Select', datafield: 'id',pinned: true, width:'3%' ,cellsalign: 'center', cellsrenderer: function (cellValue, options, rowObject) { return '<div align="center" style="padding-top:5px" > <input name="contactids" type="checkbox" onclick="selectedContactlist()" value="'+cellValue+'" /> </div>'; }, }, {text:'First name',datafield:'firstname', resizable: true ,width:'20%' }, {text:'Second name',datafield:'lastname', resizable: true,width:'15%'}, {text:'Email',datafield:'email', resizable: true, width:'17%'}, {text:'Company',datafield:'company', resizable: true, width:'15%'}, {text:'Time of Creation',datafield:'last_updated', resizable: true, width:'15%'}, {text:'List Name',datafield:'name',resizable: true,width:'15%'}, {text:'Id group',hidden:true, datafield:'idgroup'}] });
Notify me of follow-up replies via email
Hi,
I do not know what is the problem on your side. I also see that in your code, you set properties of jqxGrid that are not built-in – like mtype. I suggest you to learn how to build your client and server side for using a Grid with Paging, Sorting and Filtering from the available help topics in the PHP Integration section and especially this one: php-server-side-grid-paging-and-filtering.htm. In addition, there are several samples of jqxGrid available online with Server Paging. You can find them in the Demo.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.