diff options
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);
}
|