DHTML JavaScript Grid samples

Attaching Event Handlers

Control grid processing and user behaviour using Grid Event Handlers available through Javascript Methods

Protocol:

<div id="gridbox" width="100%" height="250px" style="background-color:white;overflow:hidden"></div> <script> function doOnRowSelected(id){ ... } function doOnCellEdit(stage,rowId,cellInd){ if(stage==0){ ... return true; }else if(stage==1){ ... }else if(stage==2){ ... } } function doOnEnter(rowId,cellInd){ ... } function doOnCheck(rowId,cellInd,state){ ... } mygrid = new dhtmlXGridObject('gridbox'); ... mygrid.setOnRowSelectHandler(doOnRowSelected); mygrid.setOnEditCellHandler(doOnCellEdit); mygrid.setOnEnterPressedHandler(doOnEnter); mygrid.setOnCheckHandler(doOnCheck); mygrid.init(); mygrid.loadXML("../grid.xml"); </script>

Go to the dhtmlxGrid main page or Close this page