我有一個slickgrid,約100行。 其數據在5秒鐘內刷新,但每次更新都會導致滾動重置。 我試圖使用dataview和dataview.refresh(),但這次沒有變化反射到網格。光滑的網格中的數據更新
這裏是我的嘗試在每次刷新:
mapMemoryTableDataView.beginUpdate();
mapMemoryTableDataView.setItems(data);
mapMemoryTableDataView.endUpdate();
mapMemoryTableDataView.refresh();
if(mapMemoryTableGrid == null)
mapMemoryTableGrid = new Slick.Grid("#datatableMap1", mapMemoryTableDataView, columns, options);
mapMemoryTableGrid.updateRow(1)
mapMemoryTableGrid.render()