hi. this is the drag -n-drop and filter problem
at first i dont make enableSmartRendering turn on,so filter 300 data is too slow ,then i turn it on , i find that filter data is very fast ,but when i get 1000 data and drag one data from mygrid1 drop to mygrid2,i find it begin slow.
how to make it fast? can you tell me some to try? bellow is my code. thanks.
mygrid1 = new dhtmlXGridObject('gridbox1');
mygrid1.setImagePath("imgs/xdhtml/");
mygrid1.setHeader("awbNo,awbStatus,awbDate,awbFrom,awbTo,awbArrive,awbName,awbNumber,awbBy,awbFor");
mygrid1.setInitWidths(90 + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width);
mygrid1.setColAlign("center,center,right,right,right,right,right,right,right,right");
mygrid1.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
mygrid1.setColSorting("int,str,str,str,str,str,str,str,str,str")
mygrid1.enableEditEvents(false, false, true);
mygrid1.enableDragAndDrop(false);mygrid1.setOnRowDblClickedHandler(leftMove);
mygrid1.init();
mygrid1.setSkin("light");
mygrid2 = new dhtmlXGridObject('gridbox2');
mygrid2.setImagePath("imgs/xdhtml/");
mygrid2.setHeader("awbNo,awbStatus,awbDate,awbFrom,awbTo,awbArrive,awbName,awbNumber,awbBy,awbFor");
mygrid2.setInitWidths(90 + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width + "," + width);
mygrid2.setColAlign("center,center,right,right,right,right,right,right,right,right");
mygrid2.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
mygrid2.setColSorting("int,str,str,str,str,str,str,str,str,str")
mygrid2.enableEditEvents(false, false, true);
mygrid2.attachHeader("#text_filter,-,-,-,-,-,-,-,-,-");
mygrid2.enableDragAndDrop(false);
mygrid2.init();
mygrid2.setSkin("light");
mygrid2.enableSmartRendering(true);
mygrid2.setAwaitedRowHeight(20);
mygrid2.setOnRowDblClickedHandler(rightMove);
if("${resultXml}"!="null" && "${resultXml}"!=""){
mygrid2.loadXMLString("${resultXml}");
}
function rightMove() {
var mid = mygrid2.getSelectedRowId();
mygrid2.filterBy(0);
if(!mygrid1.doesRowExist(mid)){
mygrid2.moveRow(mid, 'row_sibling', mid, mygrid1);
}
mygrid2._srowsCol=mygrid2._f_rowsBuffer=mygrid2._srowsBuf=null;
mygrid2.filterByAll();
}
function leftMove() {
var mid = mygrid1.getSelectedRowId();
var mid = mygrid1.getSelectedRowId();
mygrid2.filterBy(0);
mygrid1.moveRow(mid, 'row_sibling', mid, mygrid2);
mygrid2._srowsCol=mygrid2._f_rowsBuffer=mygrid2._srowsBuf=null;
mygrid2.filterByAll();
}
hony,look for your answer..