Well I have found something. the problem was when i was going to use validation in multiple columns.
myGrid.setColValidators("NotEmpty,NotEmpty,,");
But is_invalid status of a row was undefined if i don't set the status of the row to true on an event
myGrid.attachEvent("onValidationError", function (id, ind, value) {
dpmygrid.set_invalid(id,true)
}
But when i correct one validation it automatically update the Is_Invalid status of row to false even there are still some other errors in the same row. So later on i used 'setUserData' to update the status of the grid row.
myGrid.attachEvent("onValidationError", function (id, ind, value) {
myGrid.setUserData(id, ind, "error");
}
myGrid.attachEvent("onValidationCorrect", function (id, ind, value) {
myGrid.setUserData(id, ind, null);
}
and before sumbit we can check the setUserData status of the row.