From 261c29ece2ccf37e6419b9886cefd29f9dbb3c89 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 17 Mar 2006 03:16:13 +0000 Subject: Using constants as item types. --- framework/Web/UI/WebControls/TEditCommandColumn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TEditCommandColumn.php') diff --git a/framework/Web/UI/WebControls/TEditCommandColumn.php b/framework/Web/UI/WebControls/TEditCommandColumn.php index abc372a0..65e389bd 100644 --- a/framework/Web/UI/WebControls/TEditCommandColumn.php +++ b/framework/Web/UI/WebControls/TEditCommandColumn.php @@ -153,9 +153,9 @@ class TEditCommandColumn extends TDataGridColumn public function initializeCell($cell,$columnIndex,$itemType) { parent::initializeCell($cell,$columnIndex,$itemType); - if($itemType==='Item' || $itemType==='AlternatingItem' || $itemType==='SelectedItem') + if($itemType===TDataGrid::IT_ITEM || $itemType===TDataGrid::IT_ALTERNATINGITEM || $itemType===TDataGrid::IT_SELECTEDITEM) $cell->getControls()->add($this->createButton('Edit',$this->getEditText(),false,'')); - else if($itemType==='EditItem') + else if($itemType===TDataGrid::IT_EDITITEM) { $controls=$cell->getControls(); $controls->add($this->createButton('Update',$this->getUpdateText(),$this->getCausesValidation(),$this->getValidationGroup())); -- cgit v1.2.3