Return false in the 'onBeforeCellEdit' to deny the editing action. Please refer to the code below:
$('#dg').datagrid({
data: data,
onBeforeCellEdit: function(index,field){
var row = $(this).datagrid('getRows')[index];
if (row.Column2 == 'BANK'){
return true;
} else {
return false;
}
}
}).datagrid('enableCellEditing').datagrid('gotoCell', {
index: 0,
field: 'Column1'
});