summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-04 23:32:21 +0000
committerxue <>2006-02-04 23:32:21 +0000
commit97d5ad831a6003418562b7f44e9a08e562d88a0c (patch)
tree619067b19bab202fb174c904f5fa287886bd186d /framework
parente7622f08814c6c7a1166addf9bc23c5780bd74b0 (diff)
Added an example of TDataGrid showing updating and deleting functionalities.
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index ac22fb9c..eceb498b 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -106,7 +106,7 @@ Prado::using('System.Web.UI.WebControls.TTable');
* @package System.Web.UI.WebControls
* @since 3.0
*/
-class TDataGrid extends TBaseDataList
+class TDataGrid extends TBaseDataList implements INamingContainer
{
private $_columns=null;
private $_autoColumns=null;
@@ -820,7 +820,6 @@ class TDataGrid extends TBaseDataList
$ds->setDataSource(new TDummyDataSource($itemCount));
else
$ds->setDataSource(new TDummyDataSource($this->getViewState('DataSourceCount',0)));
-
$columns=new TList($this->getColumns());
$columns->mergeWith($this->_autoColumns);
@@ -879,12 +878,14 @@ class TDataGrid extends TBaseDataList
if($allowPaging && $ds->getCurrentPageIndex()>=$ds->getPageCount())
throw new TInvalidDataValueException('datagrid_currentpageindex_invalid');
// get all columns
- $columns=new TList($this->getColumns());
if($this->getAutoGenerateColumns())
{
+ $columns=new TList($this->getColumns());
$autoColumns=$this->createAutoColumns($ds);
$columns->mergeWith($autoColumns);
}
+ else
+ $columns=$this->getColumns();
$items=$this->getItems();