summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TTemplateColumn.php
diff options
context:
space:
mode:
authorxue <>2006-03-17 03:16:13 +0000
committerxue <>2006-03-17 03:16:13 +0000
commit261c29ece2ccf37e6419b9886cefd29f9dbb3c89 (patch)
treebb67b9d5bb719827ead69017fd52908a6438bb23 /framework/Web/UI/WebControls/TTemplateColumn.php
parent3ec0ec6275b1ab8a95b2696febcdd0284732fce2 (diff)
Using constants as item types.
Diffstat (limited to 'framework/Web/UI/WebControls/TTemplateColumn.php')
-rw-r--r--framework/Web/UI/WebControls/TTemplateColumn.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/Web/UI/WebControls/TTemplateColumn.php b/framework/Web/UI/WebControls/TTemplateColumn.php
index 08c4e2c6..f83e3290 100644
--- a/framework/Web/UI/WebControls/TTemplateColumn.php
+++ b/framework/Web/UI/WebControls/TTemplateColumn.php
@@ -138,18 +138,18 @@ class TTemplateColumn extends TDataGridColumn
$template=null;
switch($itemType)
{
- case 'Header':
+ case TDataGrid::IT_HEADER:
$template=$this->_headerTemplate;
break;
- case 'Footer':
+ case TDataGrid::IT_FOOTER:
$template=$this->_footerTemplate;
break;
- case 'Item':
- case 'AlternatingItem':
- case 'SelectedItem':
+ case TDataGrid::IT_ITEM:
+ case TDataGrid::IT_ALTERNATINGITEM:
+ case TDataGrid::IT_SELECTEDITEM:
$template=$this->_itemTemplate;
break;
- case 'EditItem':
+ case TDataGrid::IT_EDITITEM:
$template=$this->_editItemTemplate===null?$this->_itemTemplate:$this->_editItemTemplate;
break;
}
@@ -159,7 +159,7 @@ class TTemplateColumn extends TDataGridColumn
$cell->getControls()->clear();
$template->instantiateIn($cell);
}
- else if($itemType==='Item' || $itemType==='AlternatingItem' || $itemType==='SelectedItem' || $itemType==='EditItem')
+ else if($itemType===TDataGrid::IT_ITEM || $itemType===TDataGrid::IT_ALTERNATINGITEM || $itemType===TDataGrid::IT_SELECTEDITEM || $itemType===TDataGrid::IT_EDITITEM)
$cell->setText('&nbsp;');
}
}