Commit 85df7814 by sanchezby

Update data-grid.md

DataColumn doesn't have "name" & "type" fields, and should have fully qualified name if not omitted
parent cd7e51df
...@@ -50,12 +50,10 @@ echo GridView::widget([ ...@@ -50,12 +50,10 @@ echo GridView::widget([
'username', 'username',
// More complex one. // More complex one.
[ [
'class' => 'DataColumn', // can be omitted, default 'class' => 'yii\grid\DataColumn', // can be omitted, default
'name' => 'column1',
'value' => function ($data) { 'value' => function ($data) {
return $data->name; return $data->name;
}, },
'type'=>'raw',
], ],
], ],
]); ]);
......
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