EasyUI Forum
May 14, 2024, 01:49:16 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: show checkbox on grid  (Read 2562 times)
Steve2106
Newbie
*
Posts: 20


View Profile Email
« 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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':'')+'>';
}
},
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!