From c382794ff0e7575ae31cc549789a84d75e6f9a57 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 26 Mar 2014 19:28:20 +0100 Subject: Fix #506 (cherry picked from commit eaaa9da0c4912f782c3a1043b710ac1b598a41a5) --- framework/Web/UI/WebControls/TLiteralColumn.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/WebControls/TLiteralColumn.php b/framework/Web/UI/WebControls/TLiteralColumn.php index 973ab801..4b2c39fc 100644 --- a/framework/Web/UI/WebControls/TLiteralColumn.php +++ b/framework/Web/UI/WebControls/TLiteralColumn.php @@ -109,18 +109,13 @@ class TLiteralColumn extends TDataGridColumn if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::EditItem || $itemType===TListItemType::SelectedItem) { if($this->getDataField()!=='') - $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); - else { - if(($dataField=$this->getDataField())!=='') - $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); - else - { - $text=$this->getText(); - if($this->getEncode()) - $text=THttpUtility::htmlEncode($text); - $cell->setText($text); - } + $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); + } else { + $text=$this->getText(); + if($this->getEncode()) + $text=THttpUtility::htmlEncode($text); + $cell->setText($text); } } else -- cgit v1.2.3