// In this sample, you use args.value to check the year that the user enters in the "Acquired" column.
// If it's less than 1990 or greater than the current year, then the event handler will return false to cancel updating and show the user an alert message.
$("#element").wijgrid({
beforeCellUpdate: function(e, args) {
switch (args.cell.column().dataKey) {
case "Acquired":
var $editor = args.cell.container().find("input"),
value = $editor.wijinputnumber("getValue"),
curYear = new Date().getFullYear();
if (value < 1990 || value > curYear) {
$editor.addClass("ui-state-error");
alert("value must be between 1990 and " + curYear);
$editor.focus();
return false;
}
args.value = value;
break;
}
}
});