Can I Echo Value Some Column In Tbgridview?

index.php




<?php

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

    'type' => 'striped condensed',

    'enablePagination' => true,

    'dataProvider' => Customers::model()->getBooker(0,0),

    'template' => "{pager}\n{items}\n",

    'columns' => array(

        array(

            'name' => 'C_name',

            'header' => 'name',

        ),

        array(

            'name' => 'C_seats',

            'header' => 'seats',

        ),

        array(

            'name' => 'C_time',

            'header' => 'time',

        ),

        array(

            'name' => 'PIN',

            'header' => 'PIN',

        ),

    ),

));



I want to echo in column C_seats Can I do that?

Example

First row echo line 1

Second row echo line 2

You can modifies these lines:




array(

    'name' => 'C_seats',

    'header' => 'seats',

),



to (if you use pagination)




array(

    'header' => 'seats',

    'value'=>'"line ".$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1',

),



or (if you don’t use pagination)




array(

    'header' => 'seats',

    'value' => '"line ".$row+1',

),