summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-02-10 02:33:58 +0000
committerxue <>2006-02-10 02:33:58 +0000
commit0fe009ab854ee673c77d43fc1faa20ac8faa9167 (patch)
tree29f213adf4d46e645c26ae1abcb6139322e63c69
parent261cdaa7b996ba910fddb883f892aa5b0b15a470 (diff)
Fixed a bug in TTemplateColumn about HeaderText.
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page3
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page11
-rw-r--r--framework/Web/UI/WebControls/TTemplateColumn.php2
3 files changed, 4 insertions, 12 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
index 6d3397ee..be2f80bc 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
@@ -46,8 +46,7 @@
HeaderText="In-stock"
DataField="instock"
/>
- <com:TTemplateColumn>
- <prop:HeaderTemplate>Rating</prop:HeaderTemplate>
+ <com:TTemplateColumn HeaderText="Rating">
<prop:ItemTemplate>
<img src="images/star<%#$this->NamingContainer->DataItem['rating']%>.gif" alt="" />
</prop:ItemTemplate>
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
index 35d6c612..050182ea 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
@@ -45,17 +45,10 @@
HeaderStyle.Wrap="false"
DataField="instock"
/>
- <com:TTemplateColumn SortExpression="rating">
- <prop:HeaderTemplate>
- <com:TLinkButton
- Text="Rating"
- CommandName="Sort"
- CommandParameter="rating"
- CausesValidation="false" />
- </prop:HeaderTemplate>
+ <com:TTemplateColumn HeaderText="Rating" SortExpression="rating">
<prop:ItemTemplate>
<img src="images/star<%#$this->NamingContainer->DataItem['rating']%>.gif" alt="" />
- </prop:ItemTemplate>
+ </prop:ItemTemplate>
</com:TTemplateColumn>
</com:TDataGrid>
diff --git a/framework/Web/UI/WebControls/TTemplateColumn.php b/framework/Web/UI/WebControls/TTemplateColumn.php
index 8d852d68..350f0f92 100644
--- a/framework/Web/UI/WebControls/TTemplateColumn.php
+++ b/framework/Web/UI/WebControls/TTemplateColumn.php
@@ -155,7 +155,7 @@ class TTemplateColumn extends TDataGridColumn
$cell->getControls()->clear();
$template->instantiateIn($cell);
}
- else
+ else if($itemType==='Item' || $itemType==='AlternatingItem' || $itemType==='SelectedItem' || $itemType==='EditItem')
$cell->setText('&nbsp;');
}
}