2011-07-11 73 views
0

一起使用目前我从我的Servlet获得100条记录。rowsPerPage不与dojox.grid.DataGrid

我想每页只显示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> 

回答

1

我建议你开始使用QueryReadStore,并改变你的servlet来尊重作为帖子一部分的开始和计数参数。这将允许网格获取1-20行,然后21-40当用户向下滚动时,等等。

如果您希望告诉网格一次只渲染20行并等待其他人的滚动事件,则应该已经处理该事件。我建议你仔细检查你的网格。最初应该使用值呈现20行,后面的行应该在所有值中都有“...”,直到滚动到视图中。

相关问题