specifies a column which values should be verified before sending to the server
index | number | the index of column |
verifyFunc | function | a function that will verify values of the specified column (if not set, the values will be compared to an empty string) |
// checks if the 1st column values is not equal to 0
myDataProcessor.setVerificator(0,greater_0);
function greater_0(value){
return value>0;
}
//checks if the 2nd column values is not empty
myDataProcessor.setVerificator(1,not_empty);
function not_empty(value,id,ind){
if (value=="") mygrid.setCellTextStyle(id,ind,"background-color:yellow;");
return value!="";
}
Beware, the method is used for the Grid component only.
The verifying function goes through all cells of the column and takes 3 parameters: