Checkbox click event

Hi Team,

I have developed a prototype where i am unable to get onclick event for checkbox.

Can you please assist on this and even how to get all rows of datatable using the id ?

Counter in the footer
	<link rel="stylesheet" type="text/css" href="../common/samples.css">
	<style type="text/css">
		.checked{
			color:green;
			font-weight: bold; cursor:pointer;
		}
		.notchecked{
			color:red;
			font-weight:bold; cursor: pointer;
		}
	</style>
</head>
<body>
	<div id="testA"></div>
	<script type="text/javascript" charset="utf-8">
	
	var small_film_set = [
		{ id:1, doctorName:"Piyush C", date:"20/04/2014", fee:200},
		{ id:2, doctorName:"Meera mehra", date:"22/04/2014", fee:250},
		{ id:3, doctorName:"Naidu B", date:"24/04/2014", fee:300},
		{ id:4, doctorName:"Roseiz", date:"01/05/2014", fee:100},
		{ id:5, doctorName:"Antony", date:"20/06/2014", fee:100},
		{ id:6, doctorName:"Lehar M K", date:"23/06/2014", fee:500}
	];
	webix.ready(function(){
		webix.ui({			
			rows:[				
			{ cols:[
				{
						container:"testA",
						view:"datatable",
						id:"datatable_id",
						columns:[
							{ id:"rank",header:"Pay?",template:"{common.checkbox()}", css:"rank",  width:50,	sort:"int",
								footer:{text:"Total:", colspan:2}
							},
							{ id:"doctorName",header:["Dr. Name"], width:200 },
							{ id:"date",header:"Date" , width:80,	sort:"int"},
							{ id:"fee",	header:"Fee", 	width:100,	sort:"int",
								footer:{ content:"summColumn" }
							}
						],
						autoheight:true,
						autowidth:true,
						data:small_film_set,
						footer:true,								
						checkboxRefresh:true,
				}]
			},
			{view:"button" ,label:"Pay",width:430,click:make_payment}				
			]				
		});			
	
				function custom_checkbox(obj, common, value){
					if (value){
							return "<div class='webix_table_checkbox checked'> YES </div>";
						}
					else{
							return "<div class='webix_table_checkbox notchecked'> NO </div>";
						}
				};
				
				function make_payment(){
					
				}
	});		
	</script>
</body>

Please check http://webix.com/snippet/05f919a1

Hi Viktor, Thanks for your reply,

One small question : How can we make all checkbox checked by default

You can set it in the data

 { rank:1, id:1, doctorName:"Piyush C", date:"20/04/2014", fee:200},

rank - id of column for that initial values need to be set