Categories | Question details Back To List | ||
error when calling rid.selectCell(rowIndex, colIndex, false, false, true) Using the code that you sent to me below, I still get an error when I edit the cell one grid (but not on another grid) Here is the code: mygrid.attachEvent("onEditCell",function(stage,id,ind,value){ if(stage == 2) { if (some_check(value)) window.setTimeout(function(){ mygrid.selectCell(mygrid.getRowIndex(id),ind,false,false,true); },1); } return true; }); The Javascript error keeps saying "Invalid argument. if I replace true with false such as mygrid.selectCell(mygrid.getRowIndex(id),ind,false,false,false); I do not get any errors from Javascript but I can not get cell focused anymore. Q: Whydoes this code work for that window and and do not work for this window? Will using iframe affect that? Answer posted by Support on Apr 02, 2008 07:53 >>Q: Whydoes this code work for that window and and do not work for this window? Will using iframe affect that? Basically usage of iframe must not cause any problem , the component will work the same in window or in inframe. The code is correct, and has not any visible problem - the same code works in local samples. If mygrid.selectCell(mygrid.getRowIndex(id),ind,false,false,false); works for you, you can try to use mygrid.selectCell(mygrid.getRowIndex(id),ind,false,false,false); mygrid.editCell(); //switch currently selected cell to edit mode If problem still occurs for you - please send any kind of sample ( you can send it directly to support@dhtmlx.com ) |