From 96c7534ca3d12d2c8a9b58168ef0706f2751649e Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sat, 24 Aug 2013 16:44:04 +0200 Subject: [PATCH] set default format for gridview to text default format is text in short format so it should also be like that in array() defintion. --- framework/yii/grid/DataColumn.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/yii/grid/DataColumn.php b/framework/yii/grid/DataColumn.php index 29f6278..d31507d 100644 --- a/framework/yii/grid/DataColumn.php +++ b/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