Browse Source

Merge pull request #805 from cebe/datacolumn-default-format

set default format for gridview to text
tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
11ef65812b
  1. 4
      framework/yii/grid/DataColumn.php

4
framework/yii/grid/DataColumn.php

@ -35,8 +35,10 @@ class DataColumn extends Column
/**
* @var string in which format should the value of each data model be displayed as (e.g. "text", "html").
* Supported formats are determined by the [[GridView::formatter|formatter]] used by the [[GridView]].
* Default format is "text" which will format the value as an HTML-encoded plain text when
* [[\yii\base\Formatter]] or [[\yii\i18n\Formatter]] is used.
*/
public $format;
public $format = 'text';
/**
* @var boolean whether to allow sorting by this column. If true and [[attribute]] is found in
* the sort definition of [[GridView::dataProvider]], then the header cell of this column

Loading…
Cancel
Save