events_grid
Control grid processing and user behaviour using Grid Event Handlers available through Javascript Methods
<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){
...
}
function doBeforeRowDeleted(rowId){
return confirm("Are you sure you want to delete row");
}
mygrid = new ('gridbox');
...
mygrid.setOnRowSelectHandler(doOnRowSelected);
mygrid.setOnEditCellHandler(doOnCellEdit);
mygrid.setOnEnterPressedHandler(doOnEnter);
mygrid.setOnCheckHandler(doOnCheck);
mygrid.setOnBeforeRowDeletedHandler(doBeforeRowDeleted);
mygrid.init();
mygrid.loadXML("grid.xml"); </script>