Categories | Question details Back To List | ||
Validating the element which is opened while editing a cell Hi, I am using dhtml grid in which a cell is editable. Now, I would like to validate the values in the Text area which is opened while double click on the editable cell. Conditions: 1. The text area should not have blank value when TAB key is pressed or Text area lose its focus. Thanks in advance for your help. Answer posted by dhxSupport on Feb 27, 2009 01:43 You can use "onEditCellEvent": mygrid.attachEvent("onEditCell",function(stage,rowId,cellInd,newValue,oldValue){ if ((stage==2)&&(newValue=="")) {//if editor is closed and newValue is empty alert("value is empty"); } }) More information about grid's events you can find here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/guide.html#grid_handlers http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Cust_code_in_events.html#grid_attccodeevents http://dhtmlx.com/docs/products/dhtmlxGrid/doc/events.html#grid_api_ev |