I’m trying to write some custom validation for data in my grid. It appears from the examples that the validation looks strictly at the data in the cell being validated. But in one particular case, the validity of the data in the cell depends on the contents of another cell. Currently I’m doing this:
grid.forEachRow(function(rowID){
cell = grid.cells(rowID,6);
if (grid.cells(rowID,2).getValue() === ""){
if (cell.getValue() !== "99") { cell.setBgColor("red"); }
}
});
But is there a way to more seamlessly tie that into validation rules?