Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jun 27, 2007 23:02
open dhtmlx forum
How to ensure that only numbers between 0 and 100 can be entered in a cell of the grid .

How to ensure that only numbers between 0 and 100 can be entered in a cell of the grid .
Answer posted on Jun 28, 2007 12:48
There are two ways to achieve such functionality

a) Create custom excell - you will be able to fully control any behaviours here

or

b) Use onEditCell event, code may look similar to next

    grid.attachEvent("onEditCell",function(stage,rid,cid,newv){
       if (stage==2) //edit end
          if (cid==0) // for first column only
             if (parseInt(newv)>100) return false; //block values >100

        return true;
    }
Answer posted by Stanislav (Support) on Nov 29, 2014 11:45

Not much can be said in addition to the reply above, but you also can check coldfusion tree and room booking database and find out what we have probably missed in our explanation.