How to ensure that only numbers between 0 and 100 can be ent

How to ensure that only numbers between 0 and 100 can be entered in a cell of the grid .

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;
    }