summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBoundColumn.php
diff options
context:
space:
mode:
authorxue <>2006-01-17 23:58:54 +0000
committerxue <>2006-01-17 23:58:54 +0000
commit54900d0145dfda07bde40dc6e1f0b31935b55444 (patch)
treec34892281f5ffa9f3c907e5ef48c05720707ef5d /framework/Web/UI/WebControls/TBoundColumn.php
parent3ea0de54c63f5f9ed02e259a789b01952041cfbd (diff)
Diffstat (limited to 'framework/Web/UI/WebControls/TBoundColumn.php')
-rw-r--r--framework/Web/UI/WebControls/TBoundColumn.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TBoundColumn.php b/framework/Web/UI/WebControls/TBoundColumn.php
index 729f21fd..84f52034 100644
--- a/framework/Web/UI/WebControls/TBoundColumn.php
+++ b/framework/Web/UI/WebControls/TBoundColumn.php
@@ -107,11 +107,14 @@ class TBoundColumn extends TDataGridColumn
$cell->getControls()->add($textBox);
$control=$textBox;
}
+ if(($dataField=$this->getDataField())!=='')
+ $control->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ break;
case 'Item':
case 'AlternatingItem':
case 'SelectedItem':
if(($dataField=$this->getDataField())!=='')
- $control->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
+ $cell->attachEventHandler('DataBinding',array($this,'dataBindColumn'));
break;
}
}
@@ -120,8 +123,9 @@ class TBoundColumn extends TDataGridColumn
{
$item=$sender->getNamingContainer();
$data=$item->getDataItem();
+ $formatString=$this->getDataFormatString();
if(($field=$this->getDataField())!=='')
- $value=$this->formatDataValue($this->getDataFieldValue($data,$field));
+ $value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field));
else
$value=$this->formatDataValue($data);
if(($sender instanceof TTableCell) || ($sender instanceof TTextBox))