diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index f8dd0b17..f7f51e04 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -773,7 +773,7 @@ class TDataGrid extends TBaseDataList else
$this->_autoColumns=null;
$state=$this->getViewState('Columns',array());
- if($this->_columns)
+ if($this->_columns && $this->_columns->getCount()===count($state))
{
$i=0;
foreach($this->_columns as $column)
@@ -824,6 +824,8 @@ class TDataGrid extends TBaseDataList $columns=new TList($this->getColumns());
$columns->mergeWith($this->_autoColumns);
+ $items=$this->getItems();
+
if($columns->getCount()>0)
{
foreach($columns as $column)
|