'columns'=>array(
array(
'class'=>'CCheckBoxColumn',
//'header'=>'全选',
//'value'=>'$data->id',
//'checked'=>'true',
'htmlOptions'=>array(
'width'=>'30',
'style'=>'text-align:center',
),
),
<div id="btn" style="100%; text-align:right; padding-top:20px"><?php echo CHtml::ajaxLink('批量更新', array('link/dels'), array(
'type'=>'POST',
'timeout'=>'30000',
'data'=>'js:{ids:jQuery("input[name=\'link-grid_c0\[\]\']:checked").map(function(){ return $(this).val(); }).get()}',
'beforeSend'=>'function(){ $("#btn").hide(); $("#load").show(); }',
'success'=>'function(html){ alert(html); }',
'complete'=>'function(){ $("#btn").show(); $("#load").hide(); }',
'error'=>'function(a,b,c){ if(b=="timeout") { alert("本次执行过程超过30秒,请分批更新!"); }}',
));?></div>
<div id="load" style="display: none; text-align:right; 100%; padding-top:20px">正在更新,请稍后......</div>
<script>
var ids=jQuery("input[name='link-grid_c0[]']:checked").map(function(){ return $(this).val(); });
//alert(ids.length);
</script>