Cgridview Tbody Td Set Attributes

Hi i need to create table with tbody, tr and td for example




<table>

   <tbody id="sortable1" class="droptrue">

    <tr><td class="ui-state-default">Can be dropped..</td></tr>

    <tr><td class="ui-state-default">Can be dropped..</td></tr>

    <tr><td class="ui-state-default">Can be dropped..</td></tr>

    <tr><td class="ui-state-default">Can be dropped..</td></tr>

  </tbody>

</table>

I am use Yii CGridView (this widget required)




$this->widget('bootstrap.widgets.TbGroupGridView', array(

'id'=>'order-table',

'type'=>'striped condensed',

'dataProvider'=>$orders->search(),

'filter'=>$orders,

'ajaxUpdate'=>true,

'columns' => 

    array(

        array(

            'header' => 'ID',

            'value' => 'Adminhelper::getRowNumber($row, @$_GET["OrderModel_page"])',

           ),

        'name',

        'model',

        'imei',

        'provider',

        array(

            'header' => 'payment_type',

            'value' => 'Adminhelper::getPaymentMethod($data, array("На счет телефона", "Qiwi", "Webmoney", "На карту Сбербанка", "Yandex Деньги", "PayPal" ))'

           ),

        array(

            'header'=>'AAAA',

            'value'=>'Adminhelper::getInfoButton($data)',

          ),

        array(

            'header'=>'Статус',

            'value'=>'Adminhelper::getStatusButton($data)',

          ),

        array(

            'header' => 'Copy',

            'value'=>'Adminhelper::getCopyButton($data)',

           ),

        array(

            'header'=>'Статус',

            'value'=>'Adminhelper::getDeleteButton($data)',

          ),

),

How can i set class and id for tbody, and classes for td. I not found its in CGridView class reference, but i think its configuired in htmlOptions param.

And one question too, how i can catch ajaxUpdate paging event(js) in the same widget.

Thanks for help!

Hi,

Follow this link to change your td and tbody classes

http://www.yiiframew…l-odd-and-even/

way to catch ajaxupdate events is below





$this->widget('zii.widgets.grid.CGridView', array(

	'afterAjaxUpdate'=>'function(id, data){

		console.log($(".selected").text());

}',

));