Check whole grid to see if it is valid

Hi,
I have a grid that uses live validation, so in use, typically the grid may have some cells that have red underlines, indicating that the data for those cells is invalid.
I want to check that the whole grid has no red underlines (ie is valid) before proceeding to the next stage.
Is there an easy way of asking isWholeGridValid?
Maybe by somehow checking if any cell has a red underline attribute
Thanks

You may try to use onLiveValidationError event to know which occurs if any cell fails validation:
docs.dhtmlx.com/doku.php?id=dhtm … ationerror

One technique, for anyone wanting to know how to do this, is…

//----------------------------------------------------------------------------- function checkGridForErrors() { var source = document.getElementsByTagName('html')[0].innerHTML; var count = source.match(/dhtmlx_validation_error/g); return count.length - 1; } //----------------------------------------------------------------------------- function publish() { var numOfErrors = checkGridForErrors(); if (numOfErrors > 0) { alert (numOfErrors + " cells have errors. These must be corrected before proceeding") return; }

This takes the whole generated javascript generated document and counts the number of times the string “dhtmlx_validation_error” occurs, which is the css class of the red underlined cell. -1 is required because it finds this string earlier in the document, before the actual errors.