the question about change input box display and export to ex

First, when we on click some cell , the cell will become input box . Is it possible to make editable cells look like input box before I click the cell???

second, I want to ask sth about exporting grid into excel. I hv read some example in KB. … 00&ssr=yes

it is right for me to call function toExcel() by mygrid.loadXML(“get3.xml”,toExcel ),

if it works , what is the sytax of mygrid.loadXML when it need to call two or functions?? i.e.mygrid.loadXML(“get3.xml”,functionA, toExcel )??? THANK A LOT

function toExcel(){

var jrow = mygrid.getRowsNum();

var jstr = mygrid.getAllItemIds();

jrows = new Array();

jrows = jstr.split(’,’)

var jcol = mygrid.getColumnCount();

var xls = new ActiveXObject(“Excel.Application”)

xls.visible = true



var row =0;

for (i = -1; i<jrows.length; i++){


col =0;

for (j=0; j<jcol; j++){


if (i<0){

xls.Cells( row, col).Value = mygrid.getHeaderCol(j);



xls.Cells( row, col).Value = mygrid.cells(jrows[i],j).getValue();




var rng = xls.Columns(String.fromCharCode(65, 58, 65 + jcol))


//if (isave=1) {xls.ActiveWorkbook.Save ()}

// xls.ActiveWorkbook.Close ()


No, there is no possibility to keep cells in opened state all the time, but you can start cells editing on single click using the following method:

enableEditEvents(click, dblclick, f2Key)
enable/disable events which fire excell editing, mutual exclusive with enableLightMouseNavigation
Object: dhtmlXGridObject

File required:dhtmlxgrid.js
  • click - true/false - enable/disable editing by single click
  • dblclick - true/false - enable/disable editing by double click
  • f2Key - enable/disable editing by pressing F2 key

  • To call more then one function when xml loading was finished you can call them within another function like this:

    mygrid.loadXML("some.xml", function(){