Commit 7d2d925d by Qiang Xue

Added SerialColumn to crud generated code.

parent cd969509
......@@ -43,6 +43,8 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => array(
array('class' => 'yii\grid\SerialColumn'),
<?php
$count = 0;
foreach ($generator->getTableSchema()->columns as $column) {
......@@ -55,9 +57,7 @@ foreach ($generator->getTableSchema()->columns as $column) {
}
?>
array(
'class' => 'yii\grid\ActionColumn',
),
array('class' => 'yii\grid\ActionColumn'),
),
)); ?>
<?php else: ?>
......
......@@ -15,6 +15,8 @@ namespace yii\grid;
*/
class SerialColumn extends Column
{
public $header = '#';
/**
* Renders the data cell content.
* @param mixed $model the data model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment