diff options
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page | 28 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.php | 2 |
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;
|