Problem Calling model function in cgridview in visible button

array(

	'header'=>'Manage',


	'class'=>'CButtonColumn',


	'template'=>'{Manage}',


	//'visible'=>'$data->checkSub($data->sub_id)', //it not work not call function


            'visible'=>Model::test(), //it works





	'buttons'=>array(


			'Manage Exam Result'=>array(


						'label'=>'<i class="fa fa-cogs"></i>',


						


					),


			),


	), 

),

How to solve problem?

Can you be more descriptive about your problem, I’m not getting what you are trying to do here.

CGridView is usually used in admin view, and there visible parameter in CButtonColumn indicates a boolean value (true/false) and this is used to indicate whether this column is visible.

hi

you most use "get" function in model.

Instead of checkSub , use getcheckSub in your model