Title: edatagrid: problem to format a checkbox in edatagrid editor mode Post by: 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; } } Title: Re: edatagrid: problem to format a checkbox in edatagrid editor mode Post by: stworthy on May 07, 2014, 05:16:32 PM Please try this:
Code: $('#tt').edatagrid({ Title: Re: edatagrid: problem to format a checkbox in edatagrid editor mode Post by: centurion.cl on May 08, 2014, 06:18:46 AM thank you ....thank you, .....thank you, It works !!!!!! wiiiiiiiiiiii
|