Personal tools
| Home | sandbox | dhtmlxGrid | samples | events | events_grid
Document Actions

events_grid

Sample: dhtmlxGrid Attaching Event Handlers dhtmlxGrid main page
X

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

Remove Selected Row
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){
            ...
        }
        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>

Powered by Plone CMS, the Open Source Content Management System