diff options
author | xue <> | 2006-02-04 23:32:21 +0000 |
---|---|---|
committer | xue <> | 2006-02-04 23:32:21 +0000 |
commit | 97d5ad831a6003418562b7f44e9a08e562d88a0c (patch) | |
tree | 619067b19bab202fb174c904f5fa287886bd186d /framework/Web/UI/WebControls | |
parent | e7622f08814c6c7a1166addf9bc23c5780bd74b0 (diff) |
Added an example of TDataGrid showing updating and deleting functionalities.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 7 |
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();
|