PDA

View Full Version : validate the cell value before Editor.startEdit()



dave0224
13 Jun 2007, 10:05 AM
i have a question,and i can'nt find the answer on the forum :(

how validate the cell value before Editor.startEdit() ..?



ds.insert(0, newRecord);

for (var i = 0; i < rows; i++) {

for (var j = 0; j < cols; j++) {

var gridEditor = model.getCellEditor(j,i);
var editor = gridEditor.field;

if (editor != null){

var isOK = editor.validate(); <-- error , editor.el is null
if (isOK == false) {
// alert message
}

     }    
}
}



because user do'nt change the value and is in direct press submit .
i can'nt validate the value . :(