RealGrid2 Guide
Validation
Custom Column Validation

Custom column validation

You can verify values on a cell-by-cell basis by using the onValidateColumn event that the grid generates when cell editing is complete.

onValidateColumn event

The field name and edited value of the cell are passed as parameters of the onValidateColumn event. When editing a cell is complete and moving to another cell, user validation is performed through JavaScript. If there is a problem with the column, the verification error and error message are sent to the grid as a return value.

Try changing the value of the ‘Payment’ column in the grid below.

gridView.onValidateColumn = function(grid, column, inserting, value, itemIndex, dataRow) {
     var error = {};
     if (column.fieldName === "SaveCost") {
         if (value < 50000) {
             error.level = "error";
             error.message = "Payment must be over 50,000.";
         }else if(value > 100000){
             error.level = "warning";
             error.message = "Payment must be less than 100,000.";
         }
     };
     return error;
}

For levels, messages, error states, etc., see Cell Validation.