EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Steve2106 on November 01, 2019, 05:36:58 AM



Title: show checkbox on grid
Post by: Steve2106 on November 01, 2019, 05:36:58 AM
Hi There,

I am showing on a grid a column "isPaid" and it shows as either a 1 or 0

Can someone please tell me how I show this column as a checkbox and setting checked when the value is 1

I really appreciate the help.

Best Regards,

Steve.


Title: Re: show checkbox on grid
Post by: stworthy on November 04, 2019, 08:09:14 PM
Please define the 'formatter' function to render the specified column.
Code:
{field:'isPaid',width: 50,align:'center',
formatter: function(value){
return '<input type="checkbox" disabled '+(value?'checked':'')+'>';
}
},