centurion.cl
|
|
« on: May 07, 2014, 07:40:24 AM » |
|
I have a problem to format a checkbox in edatagrid editor mode:
How I can disable a checkbox in edatagrid editor mode when I have other column value > 0
{field:'actives',title:'Actives',width:40,align:'center', formatter:function(value){ if (value == 0){ return '<span style="color:red;">'+value+'</span>'; } else { return value; } }, {field:'inactives',title:'Inactives',width:80,align:'center', formatter:function(value){ if (value == 0){ return '<span style="color:red;">'+value+'</span>'; } else { return value; } } }, {field:'state',title:'Status',width:50,align:'center', editor:{type: 'checkbox', options:{on:'S',off:'N', formatter:function(value,row,index){
/*** instruction problem *****/ if (row.actives > 0) checkbox disabled }
} }, formatter:function(value,row,index){ if (value == "N") return '<span style="color:red;">'+value+'</span>'; else return value; } }
|