Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dimitri Gielis on Nov 23, 2009 11:18
open dhtmlx forum
Validation of Entire Grid without DP

I wonder how I could call a javascript function that checks/validates the entire grid?

Something like myGrid.validate();

It should highlight all fields which don't match the validation and return false if one cell is not valid.

I'm not doing the validation on the data processing, but use:
grid.enableValidation(true, true);
grid.setColValidators("NotEmpty,NotEmpty,NotEmpty");

Thanks,
Dimitri
Answer posted by dhxSupport on Nov 24, 2009 04:03
You can use validation extension, this extension works without DP. Please find examples here http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/19_validation/ and tutorial here
http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:validation_extension
Answer posted by Stanislav (support) on Nov 24, 2009 06:00
mygrid.forEachRow(function(id){
       for (var  i = 0; i<mygrid.getColumnsNum(); i++)
            mygrid.validateCell(id,i);
});