Remove validator for one cell


to check entries in a ‘normal’ cell/row i use dhtmlxValidation like this (simple example):

dhtmlxValidation.isCheck_number = function(a) 
     if (isNaN(a))
        return false;
    if (a < 0 || a > 20)
        return false;
        return true;
// init Grid
mygrid = new dhtmlXGridObject('mygrid_container');
mygrid.setColValidators(["Check_number"]); // live validation

// init DataProcessor
dp = new dataProcessor("{save url}");
dp.setVerificator(0, dhtmlxValidation.isCheck_number);

This works, but i (and my chief :imp: ) want to have a ‘special’ insert line with two input fields with From:… To:
So i made this:

function eXcell_fromToInput(cell) 
    if (cell) 
        this.cell = cell;
        this.grid = this.cell.parentNode.grid;
        var row_id = this.cell.parentNode.idd;

        var value =  'From: ';
        value += "<input type='text' maxlength='20' name='fromNo' id='fromNo' value='' />";
        value += '&nbsp;&nbsp;To: ';
        value += "<input type='text' maxlength='20' name='toNo' id='toNo' value='' />";
        var row_id=this.cell.parentNode.idd;
    	return ($F('fromNo' + row_id) + ';' + $F('toNo' + row_id));

Generally this works too but if i want to save this new entry/entries my validator mark this line as false. Indeed this is right but no good for me. :ugeek:

Q1: Is there a way to disable/remove the dhtmlxValidation for this special cell/row?
Q2: Is it possible to expand…= function(a) with a cell id like function(a,cellId)?
Q3: If i’m in ‘isCheck_number’ it’s a way to get the parent grid (name)?
Q4: if Dataprocessor is initialized with grid why i must explicit set a validator to Dataprocessor too? If i do not the dataprocessor send datas although the grid show an error…

Thanks in advance and bye, Carsten

BTW: We transport datas with JSON

Not possible directly , but you can attach event handler to onLiveValidationError ( onValidationError ) event, which will receive id and index of cell in question. Based on id and index you can return false from event handler , in result, target cell will not be marked as invalid.

(q2) - (q3)
Not possible in current version , will be added in next one.