目前,我从我的Servlet中获得了100条记录。
我想只显示每页20个记录,我正在使用dojox.grid.DataGrid,但它仍然显示所有的100个记录请帮助。
<body class=" claro ">
<span dojoType="dojo.data.ItemFileReadStore" jsId="store1" url="http://localhost:8080/Game/servlet/Hi"></span>
<table dojoType="dojox.grid.DataGrid" store="store1" rowsPerPage="20" rowSelector="20px"
style="width: 100%; height: 500px;">
<thead>
<tr>
<th width="150px" field="name">Namer3</th>
<th width="150px" field="dept">Deptr3</th>
</tr>
</thead>
</table>
</body>发布于 2011-08-03 09:17:54
我建议您开始使用QueryReadStore,并更改您的servlet以尊重作为post一部分的start和count参数。这将允许网格获取行1-20,然后在用户向下滚动时获取21-40行,依此类推。
如果您希望告诉网格一次只渲染20行,并等待其他行的scroll事件,那么应该已经处理好了。我建议你再检查一下你的网格。最初应该用值呈现20行,后面的行应该只有"...“所有值的内部,直到滚动到视图中。
https://stackoverflow.com/questions/6653518
复制相似问题