[英]How can i activate paging buttons on flexigrid?
I have a flexigrid table when 20 items, i need to be able to use the paging buttons to change the page of the flexigrid, but when i click them nothing happens, in the other hand, the refresh button of the flexigrid works. 我有一个flexigrid表,当有20个项目时,我需要能够使用分页按钮来更改flexigrid的页面,但是当我单击它们时,什么也没有发生,另一方面,flexigrid的刷新按钮有效。 Here is my code:
这是我的代码:
$(".flexArticle").flexigrid({
url: "index.php",
dataType: 'json',
colModel : [
{display: 'ID', name : 'id', width : 40, sortable : true, align: 'left'},
{display: 'Nombre', name : 'name', width : 150, sortable : true, align: 'left'},
{display: 'Categoria', name : 'category', width : 150, sortable : true, align: 'left'}
],
searchitems : [
{display: 'Nombre', name : 'name'}
],
sortname: "id",
sortorder: "asc",
usepager: true,
title: "Articulos",
useRp: true,
rp: 10,
showTableToggleBtn: false,
resizable: false,
width: 'auto',
height: 'auto',
singleSelect: true,
});
What am i missing to achieve the paging? 我缺少实现分页的功能吗?
you have to implement paging at the ServerSide also and get the values of paging indexes from there. 您还必须在ServerSide上实现分页,并从那里获取分页索引的值。
Flexigrid requires a few parameters to be passed back in the JSON array. Flexigrid需要在JSON数组中传递一些参数。
Page : The current page number. 页数 :当前页码。
Total :The total number of records in the result set. 总数 :结果集中的记录总数。 Used by Flexigrid to calculate the number of pages
Flexigrid用于计算页数
Rows : This is an array containing the data for the rows. 行 :这是一个包含行数据的数组。 Each row needs a unique id and an array of column data.
每行都需要一个唯一的ID和一个列数据数组。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.