1

我有一个 dojox.grid.DataGrid。在这个问题是当我用鼠标滚轮在网格中向下滚动然后它再次加载网格中的数据并且滚动再次到达顶部。这是我的代码:

target_value = this.store.getValue(l_cell, "target_value"); selected_row_data.target_type = this.store.getValue(l_cell, "target_type"); selected_row_data.created_by = this.store.getValue(l_cell, "created_by"); selected_row_data.roll_up = this.store.getValue(l_cell, "roll_up"); selected_row_data.equip_id = this.store.getValue(l_cell, "equip_id"); selected_row_data.equip_name = this.store.getValue(l_cell, "equip_name"); selected_row_data.meter_list = this.store.getValue(l_cell, "mater_list"); } radio_clicked_flag=false;}} ,dojo.byId("grid5"));

避免/消除此问题的最佳方法是什么。提前致谢

4

1 回答 1

0

有同样的问题!这是一个解决方法:

你必须初始化网格

自动高度:真

然后滚动应该可以正常工作!

new dojox.grid.DataGrid({id:'grid_spark', store: store,..., autoHeight:true ,...

但请注意:这将渲染每一行并将其保存在内存中。这就是加载时间更长的原因,尤其是当您有很多行时。

卢西安

于 2013-01-25T14:11:07.127 回答