HOWTO : compare 2 cells in a validate method

Hello…again,

I’m looking for a way to validate date cells by comparing them each other.

For example :
i have a grid with rows containing two columns (starting date, ending date)
i have enable validation on my grid
(myGrid.enableValidation(true,true); myGrid.setColValidators(someGoodMethodStart,someGoodMethodEnd):wink:

and i want that, when i send data, the validation process compare starting date and ending date in order to validate that starting date < ending date.

Any idea ?

Validation work on per-column basis, so it doesn’t fit good for your use-case.
It better to use custom iteration as

var confirm = true; grid.forEachRow(function(id){ var val1 = grid.cells(id,1).getValue(); var val2 = grid.cells(id,2).getValue(); if(!some_check(val1,val2)) confirm = false; }) if (confirm) trigger_data_sending();