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/TDropDownListColumn.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TDropDownListColumn.php') diff --git a/framework/Web/UI/WebControls/TDropDownListColumn.php b/framework/Web/UI/WebControls/TDropDownListColumn.php index 384a3701..c3428371 100644 --- a/framework/Web/UI/WebControls/TDropDownListColumn.php +++ b/framework/Web/UI/WebControls/TDropDownListColumn.php @@ -255,7 +255,6 @@ class TDropDownListColumn extends TDataGridColumn */ public function initializeCell($cell,$columnIndex,$itemType) { - parent::initializeCell($cell,$columnIndex,$itemType); if(!$this->_dataBound && $this->_listControl->getDataSource()!==null) { $this->_listControl->setDataTextField($this->getListTextField()); @@ -284,6 +283,9 @@ class TDropDownListColumn extends TDataGridColumn if($this->getDataTextField()!=='' || $this->getDataValueField()!=='') $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); break; + default: + parent::initializeCell($cell,$columnIndex,$itemType); + break; } } @@ -295,7 +297,7 @@ class TDropDownListColumn extends TDataGridColumn public function dataBindColumn($sender,$param) { $item=$sender->getNamingContainer(); - $data=$item->getDataItem(); + $data=$item->getData(); if(($valueField=$this->getDataValueField())!=='') $value=$this->getDataFieldValue($data,$valueField); else -- cgit v1.2.3