0

As the title says, i want to display the number of records next to the checkbox i am using to filter clistview data. This can be easily handled on page load, however when doing an AJAX request, the $.fn.yiiListView.update code updates just the list data and due to the auto magic, I need some insight over how to perform operations such as update the number adjacent to each checkbox or disable a checkbox corresponding to suitable data.

I really love the power given by CListView and wan't to stick to it as much as possible, hoping for quick resolution to this.

4

1 回答 1

0

更好地了解 CListView 模块让我得到了答案。

<?php $this->widget('zii.widgets.CListView', array(
          'dataProvider'=>$dataProvider,
          'itemView'=>'_view',
          'sortableAttributes'=>array(
              'id'=>'cronologico',
              'transaction'
          ),
          'id'=>'ajaxListView',
          'ajaxUrl'=> $this->createUrl('/experience/ajaxindex'),
          'ajaxUpdate' => 'ratingFilter',
        )); 

        ?>

关键是 ajaxUpdate 属性,它接收要与列表一起更新的标签的 id。多个 id 可以通过逗号将它们分隔为值的一部分来指定。

耶!

于 2013-09-09T09:34:59.270 回答