具有分页功能的Dojo增强网格需要访问页面中的行数 [英] Dojo Enhanced grid with pagination need to access number of rows in the page
问题描述
我正在使用分页实现 Dojo
EnhancedGrid
并且每页有一些名为的项目
。
I am implementing Dojo
EnhancedGrid
with pagination and there is something called items per page
.
10 | 20 | 30 | 40 | 50| all.
假设我在 EnhancedGrid
中选择此处20分页。如何从程序中访问值20?我想获取此值并将其存储在变量say Page-size
中。
我正在使用 Dojo
版本1.6.1
Suppose I select here 20 in the EnhancedGrid
pagination. How to access the value 20 from the program? I want to get this value and store it in a variable say Page-size
.
I am using Dojo
version 1.6.1
推荐答案
您可以使用以下方法访问dojo 1.6中的页面大小:
You can access the page size in dojo 1.6 using this:
yourGrid.pagination.plugin.pageSize;
这是一个使用dojo 1.6的工作jsfiddle:
Here is a working jsfiddle using dojo 1.6:
它使用网格的onClick事件。每次单击网格时,它都会提醒当前页面大小。
It uses the onClick event of the grid. Each time you click on the grid it alerts the current page size.
请编辑您的初始问题&添加dojo版本!
Lucian
这篇关于具有分页功能的Dojo增强网格需要访问页面中的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!