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/TLiteralColumn.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TLiteralColumn.php') diff --git a/framework/Web/UI/WebControls/TLiteralColumn.php b/framework/Web/UI/WebControls/TLiteralColumn.php index e78c4e6d..6a1f3466 100644 --- a/framework/Web/UI/WebControls/TLiteralColumn.php +++ b/framework/Web/UI/WebControls/TLiteralColumn.php @@ -108,7 +108,6 @@ class TLiteralColumn extends TDataGridColumn */ public function initializeCell($cell,$columnIndex,$itemType) { - parent::initializeCell($cell,$columnIndex,$itemType); if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::EditItem || $itemType===TListItemType::SelectedItem) { if($this->getDataField()!=='') @@ -126,6 +125,8 @@ class TLiteralColumn extends TDataGridColumn } } } + else + parent::initializeCell($cell,$columnIndex,$itemType); } /** @@ -136,7 +137,7 @@ class TLiteralColumn extends TDataGridColumn public function dataBindColumn($sender,$param) { $item=$sender->getNamingContainer(); - $data=$item->getDataItem(); + $data=$item->getData(); $formatString=$this->getDataFormatString(); if(($field=$this->getDataField())!=='') $value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field)); -- cgit v1.2.3