dhtmlxgrid Cell validation

Hi,

I have a cell element accepting integers.
How do i restrict the user to enter values only upto a certain value.

Ex: I dont want the user to enter a value more than ‘100’.
Is there an attribute i can set to the cell?

How would it be if the data to the grid is coming in the form of an XML.
What should be the attribute for <cell ****>55

Hello
try this:

  1. add custom parametr to your XML
<cell maxval="100"><![CDATA[ 54 ]]></cell>
  1. On onEditCell event
grid.attachEvent("onEditCell",function(stage,rId,cInd,nValue,oValue){
  if(stage==2){
    var maxValue = parseInt(grid.cells(rId,cInd).getAttribute("maxval"))
    return (maxValue >= nValue)? true:false;
  }
})