summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page62
1 files changed, 62 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
new file mode 100644
index 00000000..35d6c612
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample4.page
@@ -0,0 +1,62 @@
+<com:TContent ID="body">
+
+<h1>TDataGrid Sample 4</h1>
+<h2>Sorting with TDataGrid</h2>
+
+<com:TDataGrid
+ Width="700px"
+ CellPadding="2"
+ ID="DataGrid"
+ AutoGenerateColumns="false"
+ HeaderStyle.BackColor="black"
+ HeaderStyle.ForeColor="white"
+ ItemStyle.BackColor="#BFCFFF"
+ ItemStyle.Font.Italic="true"
+ AlternatingItemStyle.BackColor="#E6ECFF"
+ AllowSorting="true"
+ OnSortCommand="sortDataGrid">
+
+ <com:THyperLinkColumn
+ SortExpression="title"
+ HeaderText="Book Title"
+ DataTextField="title"
+ DataNavigateUrlField="ISBN"
+ DataNavigateUrlFormatString="http://www.amazon.com/gp/product/%s"
+ Target="_blank"
+ />
+ <com:TBoundColumn
+ SortExpression="publisher"
+ HeaderText="Publisher"
+ DataField="publisher"
+ />
+ <com:TBoundColumn
+ SortExpression="price"
+ ItemStyle.HorizontalAlign="Right"
+ ItemStyle.Wrap="false"
+ ItemStyle.Font.Italic="false"
+ ItemStyle.ForeColor="green"
+ HeaderText="Price"
+ DataField="price"
+ DataFormatString="$%.2f"
+ />
+ <com:TCheckBoxColumn
+ SortExpression="instock"
+ HeaderText="In-stock"
+ HeaderStyle.Wrap="false"
+ DataField="instock"
+ />
+ <com:TTemplateColumn SortExpression="rating">
+ <prop:HeaderTemplate>
+ <com:TLinkButton
+ Text="Rating"
+ CommandName="Sort"
+ CommandParameter="rating"
+ CausesValidation="false" />
+ </prop:HeaderTemplate>
+ <prop:ItemTemplate>
+ <img src="images/star<%#$this->NamingContainer->DataItem['rating']%>.gif" alt="" />
+ </prop:ItemTemplate>
+ </com:TTemplateColumn>
+</com:TDataGrid>
+
+</com:TContent> \ No newline at end of file