summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
authorxue <>2006-08-31 19:37:08 +0000
committerxue <>2006-08-31 19:37:08 +0000
commit42b59239cf0036ab096cc67ead335e3a81b1cdf4 (patch)
treeab8a6b4d2a633b687c7759b5d5966ee31405aa9a /demos/quickstart
parent9d375f8ef06daea97fbce6c71a8c524aca14d85d (diff)
Added TDropDownListColumn.
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page28
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php2
2 files changed, 13 insertions, 17 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
index 96affa4a..5fb19c6f 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
@@ -50,22 +50,18 @@
HeaderText="In-stock"
DataField="instock"
/>
- <com:TTemplateColumn ID="RatingColumn" HeaderText="Rating">
- <prop:ItemTemplate>
- <img src="images/star<%#$this->Parent->DataItem['rating']%>.gif" alt="" />
- </prop:ItemTemplate>
- <prop:EditItemTemplate>
- <com:TDropDownList
- SelectedValue=<%#$this->Parent->DataItem['rating'] %>
- ID="Rating">
- <com:TListItem Value="1" />
- <com:TListItem Value="2" />
- <com:TListItem Value="3" />
- <com:TListItem Value="4" />
- <com:TListItem Value="5" />
- </com:TDropDownList>
- </prop:EditItemTemplate>
- </com:TTemplateColumn>
+ <com:TDropDownListColumn
+ ID="RatingColumn"
+ HeaderText="Rating"
+ DataField="rating"
+ >
+ <prop:DataFormatString><img src="images/star%s.gif" alt="" /></prop:DataFormatString>
+ <com:TListItem Value="1" />
+ <com:TListItem Value="2" />
+ <com:TListItem Value="3" />
+ <com:TListItem Value="4" />
+ <com:TListItem Value="5" />
+ </com:TDropDownListColumn>
<com:TEditCommandColumn
HeaderText="Edit"
HeaderStyle.Width="100px"
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php
index 69a164c6..bb18f36b 100644
--- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php
@@ -164,7 +164,7 @@ class Sample3 extends TPage
$item->PublisherColumn->TextBox->Text, // publisher
$item->PriceColumn->TextBox->Text, // price
$item->InStockColumn->CheckBox->Checked, // instock
- $item->RatingColumn->Rating->SelectedValue // rating
+ $item->RatingColumn->DropDownList->SelectedValue // rating
);
$this->DataGrid->EditItemIndex=-1;
$this->DataGrid->DataSource=$this->Data;