How to set maxlength to a cell in DHTMLXGrid

Hi,



We are using Professional version of DhtmlxGrid. I want to know how to set maxlength to a cell in DHTMLXGrid.

Is it possible to fix the length of specific cell at the time of initilaizationn of grid? or is there any specific function provided?



Note: Other that validating the cell value length in edit event using javascript.



Please let me know ASAP.



Thnaks in advance,

Pradeep


Hello


there isn’t a public solution.


For “ed” column type you can try to use the following:


mygrid.attachEvent(“onEditCell”,function(stage,rowId,cellIndex){
if(stage==1&&cellIndex==INDEX){ /here INDEX is column index/
mygrid.editor.obj.onkeypress = function(){
return mygrid.editor.obj.value.length < 10;
}
}


return true
})