diff options
author | xue <> | 2006-03-17 03:16:13 +0000 |
---|---|---|
committer | xue <> | 2006-03-17 03:16:13 +0000 |
commit | 261c29ece2ccf37e6419b9886cefd29f9dbb3c89 (patch) | |
tree | bb67b9d5bb719827ead69017fd52908a6438bb23 /framework/Web/UI/WebControls/TCheckBoxColumn.php | |
parent | 3ec0ec6275b1ab8a95b2696febcdd0284732fce2 (diff) |
Using constants as item types.
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBoxColumn.php')
-rw-r--r-- | framework/Web/UI/WebControls/TCheckBoxColumn.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBoxColumn.php b/framework/Web/UI/WebControls/TCheckBoxColumn.php index f695bcdc..4df1e695 100644 --- a/framework/Web/UI/WebControls/TCheckBoxColumn.php +++ b/framework/Web/UI/WebControls/TCheckBoxColumn.php @@ -14,6 +14,10 @@ * TDataGridColumn class file
*/
Prado::using('System.Web.UI.WebControls.TDataGridColumn');
+/**
+ * TCheckBox class file
+ */
+Prado::using('System.Web.UI.WebControls.TCheckBox');
/**
* TCheckBoxColumn class
@@ -76,10 +80,10 @@ class TCheckBoxColumn extends TDataGridColumn public function initializeCell($cell,$columnIndex,$itemType)
{
parent::initializeCell($cell,$columnIndex,$itemType);
- if($itemType==='EditItem' || $itemType==='Item' || $itemType==='AlternatingItem' || $itemType==='SelectedItem')
+ if($itemType===TDataGrid::IT_ITEM || $itemType===TDataGrid::IT_ALTERNATINGITEM || $itemType===TDataGrid::IT_SELECTEDITEM || $itemType===TDataGrid::IT_EDITITEM)
{
- $checkBox=Prado::createComponent('System.Web.UI.WebControls.TCheckBox');
- if($this->getReadOnly() || $itemType!=='EditItem')
+ $checkBox=new TCheckBox;
+ if($this->getReadOnly() || $itemType!==TDataGrid::IT_EDITITEM)
$checkBox->setEnabled(false);
$cell->setHorizontalAlign('Center');
$cell->getControls()->add($checkBox);
|