summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
diff options
context:
space:
mode:
authorxue <>2006-02-04 23:32:21 +0000
committerxue <>2006-02-04 23:32:21 +0000
commit97d5ad831a6003418562b7f44e9a08e562d88a0c (patch)
tree619067b19bab202fb174c904f5fa287886bd186d /demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
parente7622f08814c6c7a1166addf9bc23c5780bd74b0 (diff)
Added an example of TDataGrid showing updating and deleting functionalities.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page')
-rw-r--r--demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page66
1 files changed, 66 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
new file mode 100644
index 00000000..82253c30
--- /dev/null
+++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample3.page
@@ -0,0 +1,66 @@
+<com:TContent ID="body">
+
+<h1>TDataGrid Sample 3</h1>
+<h2>Interacting with TDataGrid</h2>
+
+<com:TDataGrid
+ Width="800px"
+ CellPadding="2"
+ ID="DataGrid"
+ DataKeyField="ISBN"
+ AutoGenerateColumns="false"
+ HeaderStyle.BackColor="black"
+ HeaderStyle.ForeColor="white"
+ ItemStyle.BackColor="#BFCFFF"
+ ItemStyle.Font.Italic="true"
+ AlternatingItemStyle.BackColor="#E6ECFF"
+ EditItemStyle.BackColor="lightyellow"
+ OnItemCreated="itemCreated"
+ OnEditCommand="editItem"
+ OnUpdateCommand="saveItem"
+ OnCancelCommand="cancelItem"
+ OnDeleteCommand="deleteItem"
+ >
+
+ <com:TBoundColumn
+ HeaderText="Book Title"
+ HeaderStyle.Width="400px"
+ DataField="title"
+ />
+ <com:TBoundColumn
+ HeaderText="Publisher"
+ HeaderStyle.Width="150px"
+ DataField="publisher"
+ />
+ <com:TBoundColumn
+ ItemStyle.HorizontalAlign="Right"
+ ItemStyle.Wrap="false"
+ ItemStyle.Font.Italic="false"
+ ItemStyle.ForeColor="green"
+ HeaderText="Price"
+ HeaderStyle.Width="70px"
+ DataField="price"
+ DataFormatString="$%.2f"
+ />
+ <com:TCheckBoxColumn
+ HeaderText="In-stock"
+ DataField="instock"
+ />
+ <com:TEditCommandColumn
+ HeaderText="Edit"
+ HeaderStyle.Width="100px"
+ UpdateText="Save"
+ ItemStyle.HorizontalAlign="Center"
+ ItemStyle.Font.Italic="false"
+ />
+ <com:TButtonColumn
+ HeaderText="Delete"
+ HeaderStyle.Width="50px"
+ ItemStyle.HorizontalAlign="Center"
+ ItemStyle.Font.Italic="false"
+ Text="Delete"
+ CommandName="delete"
+ />
+</com:TDataGrid>
+
+</com:TContent> \ No newline at end of file