Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ramesh Manian on Apr 03, 2008 22:51
open dhtmlx forum
Cell type - Numeric

Hi,
Is any cell type available which allows the user only to enter numbers i.e, numeric. I tried with the "Price" type but it is always displaying $ SYMBOL WHICH IS NOT NECESSARY FOR MY CASE. i even modified the definition of the Price type in dhtmlxgridcell.js to remove the $ symbol and after that i am unable to get the math calculations processed.
IS there any way around.
Answer posted by Support on Apr 04, 2008 01:53
You can use edn excell type for such purpose, if number format enabled - it will not allow to enter anything except numbers.
Also you can modify price excell in necessary way, if you want

eXcell_price.prototype.setValue = function(val){
        if(isNaN(Number(val))){
            if(!(val||"") || (val||"")._dhx_trim()!="")
                val = 0;
            val = this.val || 0;
        }
         
        this.setCValue("<span></span><span>"+val+"</span>",val);
    }