Check documentation for the latest version 6.0 of dhtmlxSuite setColValidators DHTMLX Docs

setColValidators

assigns validators to the related column

void setColValidators(string vals);

Parameters

valsstringthe list of validators

Available only in PRO Edition

Example

//sets validators for the 1st and 2nd columns
mygrid.setColValidators("ValidInteger,ValidEmail");
//alternative syntax
mygrid.setColValidators(["ValidInteger","ValidEmail"]);
//adding a few rules for the same column
mygrid.setColValidators(["NotEmpty,ValidInteger","ValidEmail"]);
//seting null/empty value for the columns which shouldn't be affected by validation
mygrid.setColValidators("ValidInteger,,,ValidEmail");
//alternative syntax
mygrid.setColValidators(["ValidInteger",null,null,"ValidEmail"]);

Back to top