NOTE: DataGridXL requires a commercial license.
Create an account to download a trial version of DataGridXL to follow the steps in this tutorial.
DataGridXL » Docs
Column Settings
Column Validate Function
DataGridXL3 allows for straightforward per-column cell validation.
Use the validateFunction
option. Return false
to render a red background cell color that informs the user that the value is invalid.
javascript
{
validateFunction: function(cell){
if(isValidDateString(cell.value)){
return true;
} else {
return false;
}
}
}
The validateFunction
callback function provides a parameter cell
, which is the reference to the affected cell.
javascript
// cell reference
{
value: 'My Cell Value'
}
Generated: 25.01.28 (V3.25.01.22)