From 81b323cf3d27949a5c78d44bd016044be3197b6c Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 5 Feb 2007 21:55:51 +0000 Subject: Added renderer feature to TDataGrid. --- framework/Web/UI/WebControls/TCheckBoxColumn.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TCheckBoxColumn.php') diff --git a/framework/Web/UI/WebControls/TCheckBoxColumn.php b/framework/Web/UI/WebControls/TCheckBoxColumn.php index beef3aa1..c70a67c9 100644 --- a/framework/Web/UI/WebControls/TCheckBoxColumn.php +++ b/framework/Web/UI/WebControls/TCheckBoxColumn.php @@ -88,7 +88,6 @@ class TCheckBoxColumn extends TDataGridColumn */ public function initializeCell($cell,$columnIndex,$itemType) { - parent::initializeCell($cell,$columnIndex,$itemType); if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) { $checkBox=new TCheckBox; @@ -100,6 +99,8 @@ class TCheckBoxColumn extends TDataGridColumn if($this->getDataField()!=='') $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); } + else + parent::initializeCell($cell,$columnIndex,$itemType); } /** @@ -110,7 +111,7 @@ class TCheckBoxColumn extends TDataGridColumn public function dataBindColumn($sender,$param) { $item=$sender->getNamingContainer(); - $data=$item->getDataItem(); + $data=$item->getData(); if(($field=$this->getDataField())!=='') $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data,$field)); else -- cgit v1.2.3