The page effects rendered according to the values provided in DataSource are as follows:
The last column of operations, depending on whether it has been processed to show the "Recycle" action button.
The relevant code is mainly the way in which the conditional judgment statement is used in the template:
var Kendogridpermissionapplys = $ ("#kendo_grid_permission_applys"). Kendogrid ({datasource:{data:<?php Ech o $test;? Sortable:true, Scrollable:false, Selectable:true, pageable:{messages:{ Display: "<?php echo yii::t (' Default ', ' Showing {0}-{1} ' from {2} data items ');?>", EMP Ty: "<?php echo yii::t (' Default ', ' No items to display ');?>", First: "<?php echo yii::t (' default ') , ' Go to the first page ');?> ", Previous:" <?php echo yii::t (' Default ', ' Go to the previous page '); ?> ", Next:" <?php echo yii::t (' Default ', ' Go to the next page ');?> ", Last:" <?p HP echo yii::t (' Default ', ' Go to the last page ');?> "}}, columns:[{ Field: "Apply_from", Title: "<?php echo yii::t (' Default ', ' Apply from ');?>"}, { Field: "Apply_contents", Title: "<?php echo yii::t (' Default ', ' Apply contents ');?>" }, {field: "Apply_status", Title: "<?php echo yii::t (' Default ', ' Apply status ' );?> "}, {field:" Apply_create_time ", Title:" <?php Echo yii::t (' Default ', ' Apply Create time ');?> "}, {Template:" <a class= ' K-butto N ' href= ' index.php?r=apply/admin/showapply&apply_id=#=apply_id#&apply_from=#=apply_from# ' style= ' Min-width:24px ' > View </a><a class= ' K-button ' style= ' min-width:24px ' onclick= ' ifgotodistributepermission ( #=apply_id#, #=apply_status_en#) ' > Assign </a> ' + ' # if (apply_status_en = = 2) {# "+" <a class= ' k-but Ton ' onclick= ' recyclepermission (#=apply_id#) ' > Recycle </a> "+" #} # ", Title:" <?php Echo yii::t (' Defa Ult ', ' Operate ');?> "}]}). Data ("Kendogrid");
The use of conditional judgment in template in Kendoui control Kendogrid