I am using following code for cell data validation. But ‘return false’ is not breaking the loop.
this._grid.forEachRow(function(id){
var notional = this.cells(id,2).getValue();
if(!prototype._validateDecimal(notional,5))
{
alert (�Error!�);
this.selectCell(this.getRowIndex(id),2);
this.editCell();
return false;
}
});
Actually you can’t. The only solution - use custom looping code instead of built in one
var max = mygrid.getRowsNum();
for (var i=0; i<max; i++){
var notional = this.cells2(i,2).getValue();
if(!prototype._validateDecimal(notional,5))
{
alert (�Error!�);
this.selectCell(i,2);
this.editCell();
return false;
}
}
});