summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-11-09 12:35:57 +0000
committerctrlaltca@gmail.com <>2011-11-09 12:35:57 +0000
commit5380a870b799098d7900b1098b4e9930ba71f10e (patch)
tree8face776f884dd29b6a0ca8216206baa6954c564 /framework/Web/UI/WebControls
parent199ebf217cc4b597fc2044d50ef66b73dc4c5eaf (diff)
fix #371
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 3d06363a..ede67b89 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -9,7 +9,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2011 PradoSoft
+ * @copyright Copyright &copy; 2005-2011 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web.UI.WebControls
@@ -227,6 +227,14 @@ class TDataGrid extends TBaseDataList implements INamingContainer
}
/**
+ * @return string Name of the class used in AutoGenerateColumns mode
+ */
+ protected function getAutoGenerateColumnName()
+ {
+ return 'TBoundColumn';
+ }
+
+ /**
* Adds objects parsed in template to datagrid.
* Datagrid columns are added into {@link getColumns Columns} collection.
* @param mixed object parsed in template
@@ -909,7 +917,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer
$this->_autoColumns=new TDataGridColumnCollection($this);
foreach($state as $st)
{
- $column=new TBoundColumn;
+ $column=new $this->AutoGenerateColumnName;
$column->loadState($st);
$this->_autoColumns->add($column);
}
@@ -1404,7 +1412,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer
{
foreach($row as $key=>$value)
{
- $column=new TBoundColumn;
+ $column=new $this->AutoGenerateColumnName;
if(is_string($key))
{
$column->setHeaderText($key);