dhtmlxGrid

hi

how we can mark the field is mandatory?



thanks

If you are using dataprocessor you can use next syntax

myDataProcessor.setVerificator(3,checkIfNotEmpty)
function checkIfNotEmpty(value,colName){
        if(value==""){
            showMessage(colName+ " should not be empty")
            return false
        }else
            return true;
}

This will prevent not correctly filled rows from saving.
If you need such functionality just while row editing ( without dataprocessor usage ) - you can use onEditCell event, which fire on edit end, and provide current cell value as one of incoming params.


thank you very much ,that’s help