"
DataGridXL 3 Out Now! See what's new→

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)