diff options
author | xue <> | 2007-02-05 21:55:51 +0000 |
---|---|---|
committer | xue <> | 2007-02-05 21:55:51 +0000 |
commit | 81b323cf3d27949a5c78d44bd016044be3197b6c (patch) | |
tree | 73b3cb8f214b96237812e33ed4f1b0637172ae53 /framework/Web/UI/WebControls/TButtonColumn.php | |
parent | 0aaa8b5ef02479653c0a532d9249b423ef34c7ca (diff) |
Added renderer feature to TDataGrid.
Diffstat (limited to 'framework/Web/UI/WebControls/TButtonColumn.php')
-rw-r--r-- | framework/Web/UI/WebControls/TButtonColumn.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TButtonColumn.php b/framework/Web/UI/WebControls/TButtonColumn.php index adf6879f..78b59a44 100644 --- a/framework/Web/UI/WebControls/TButtonColumn.php +++ b/framework/Web/UI/WebControls/TButtonColumn.php @@ -226,7 +226,6 @@ class TButtonColumn 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)
{
$buttonType=$this->getButtonType();
@@ -248,6 +247,8 @@ class TButtonColumn extends TDataGridColumn $cell->getControls()->add($button);
$cell->registerObject('Button',$button);
}
+ else
+ parent::initializeCell($cell,$columnIndex,$itemType);
}
/**
@@ -261,13 +262,13 @@ class TButtonColumn extends TDataGridColumn {
if(($field=$this->getDataTextField())!=='')
{
- $value=$this->getDataFieldValue($sender->getNamingContainer()->getDataItem(),$field);
+ $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field);
$text=$this->formatDataValue($this->getDataTextFormatString(),$value);
$sender->setText($text);
}
if(($sender instanceof TImageButton) && ($field=$this->getDataImageUrlField())!=='')
{
- $value=$this->getDataFieldValue($sender->getNamingContainer()->getDataItem(),$field);
+ $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field);
$url=$this->formatDataValue($this->getDataImageUrlFormatString(),$value);
$sender->setImageUrl($url);
}
|