From 979430b5bf60e5857846ecb561404a89c02cefcd Mon Sep 17 00:00:00 2001
From: xue <>
Date: Fri, 3 Feb 2006 22:17:33 +0000
Subject: Completed datagrid tutorial part one and added a new datagrid sample.
---
.gitattributes | 6 +-
demos/quickstart/images/star1.gif | Bin 0 -> 385 bytes
demos/quickstart/images/star2.gif | Bin 0 -> 382 bytes
demos/quickstart/images/star3.gif | Bin 0 -> 388 bytes
demos/quickstart/images/star4.gif | Bin 0 -> 397 bytes
demos/quickstart/images/star5.gif | Bin 0 -> 394 bytes
.../protected/pages/Controls/DataGrid.page | 9 ---
.../protected/pages/Controls/DataGrid1.page | 18 ++++-
.../protected/pages/Controls/Overview.page | 2 +-
.../pages/Controls/Samples/TDataGrid/Sample2.page | 40 ++++++++---
.../pages/Controls/Samples/TDataGrid/Sample2.php | 75 +++++++++++++++------
framework/Web/UI/WebControls/TBoundColumn.php | 12 ----
framework/Web/UI/WebControls/TDataGridColumn.php | 12 ++++
framework/Web/UI/WebControls/TFont.php | 20 +++---
framework/Web/UI/WebControls/TStyle.php | 2 +-
framework/Web/UI/WebControls/TTemplateColumn.php | 2 +
16 files changed, 134 insertions(+), 64 deletions(-)
create mode 100644 demos/quickstart/images/star1.gif
create mode 100644 demos/quickstart/images/star2.gif
create mode 100644 demos/quickstart/images/star3.gif
create mode 100644 demos/quickstart/images/star4.gif
create mode 100644 demos/quickstart/images/star5.gif
delete mode 100644 demos/quickstart/protected/pages/Controls/DataGrid.page
diff --git a/.gitattributes b/.gitattributes
index fa25de82..e3859b99 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -38,6 +38,11 @@ demos/personal/protected/application.xml -text
demos/personal/themes/BlueTheme/buttons.skin -text
demos/personal/themes/BlueTheme/icon_profile.gif -text
demos/personal/themes/BlueTheme/labels.skin -text
+demos/quickstart/images/star1.gif -text
+demos/quickstart/images/star2.gif -text
+demos/quickstart/images/star3.gif -text
+demos/quickstart/images/star4.gif -text
+demos/quickstart/images/star5.gif -text
demos/quickstart/index.php -text
demos/quickstart/index2.php -text
demos/quickstart/protected/.htaccess -text
@@ -96,7 +101,6 @@ demos/quickstart/protected/pages/Configurations/Templates1.page -text
demos/quickstart/protected/pages/Configurations/Templates2.page -text
demos/quickstart/protected/pages/Configurations/Templates3.page -text
demos/quickstart/protected/pages/Construction.page -text
-demos/quickstart/protected/pages/Controls/DataGrid.page -text
demos/quickstart/protected/pages/Controls/DataGrid1.page -text
demos/quickstart/protected/pages/Controls/DataGrid2.page -text
demos/quickstart/protected/pages/Controls/DataList.page -text
diff --git a/demos/quickstart/images/star1.gif b/demos/quickstart/images/star1.gif
new file mode 100644
index 00000000..f47a0ae4
Binary files /dev/null and b/demos/quickstart/images/star1.gif differ
diff --git a/demos/quickstart/images/star2.gif b/demos/quickstart/images/star2.gif
new file mode 100644
index 00000000..b400fd7c
Binary files /dev/null and b/demos/quickstart/images/star2.gif differ
diff --git a/demos/quickstart/images/star3.gif b/demos/quickstart/images/star3.gif
new file mode 100644
index 00000000..74582c6d
Binary files /dev/null and b/demos/quickstart/images/star3.gif differ
diff --git a/demos/quickstart/images/star4.gif b/demos/quickstart/images/star4.gif
new file mode 100644
index 00000000..f05c24d5
Binary files /dev/null and b/demos/quickstart/images/star4.gif differ
diff --git a/demos/quickstart/images/star5.gif b/demos/quickstart/images/star5.gif
new file mode 100644
index 00000000..f6a4bb71
Binary files /dev/null and b/demos/quickstart/images/star5.gif differ
diff --git a/demos/quickstart/protected/pages/Controls/DataGrid.page b/demos/quickstart/protected/pages/Controls/DataGrid.page
deleted file mode 100644
index 9170fe45..00000000
--- a/demos/quickstart/protected/pages/Controls/DataGrid.page
+++ /dev/null
@@ -1,9 +0,0 @@
-
-TBC
-TDataGrid
-
-The following example displays a list of computer product information using a TDataGrid. Columns are automatically generated. To populate datagrid items with the data, dataBind() is invoked for the datagrid in the onLoad method of the page, +The following example displays a list of computer product information using a TDataGrid. Columns are automatically generated. Pay attention to how item styles are specified and inherited. The data are populated into the datagrid using the follow code, which is common among most datagrid applications,
-Using automatically generated columns gives a quick way of browsing tabular data. In real applications, however, automatically generated columns are often not enough because developers have no way configuring their properties. Manually specified columns are thus more desirable. +Using automatically generated columns gives a quick way of browsing tabular data. In real applications, however, automatically generated columns are often not sufficient because developers have no way customizing their appearance. Manually specified columns are thus more desirable.
To manually specify columns, set AutoGenerateColumns to false, and specify the columns in a template like the following, @@ -92,8 +93,19 @@ To manually specify columns, set AutoGenerateColumns to false, and spec </com:TDataGrid>
-Note, if AutoGenerateColumns is true and there are manually specified columns, the automatically generated columns will be appended to the manually specified columns. Also note, the datagrid's Columns property only contains manually specified columns. +Note, if AutoGenerateColumns is true and there are manually specified columns, the automatically generated columns will be appended to the manually specified columns. Also note, the datagrid's Columns property contains only manually specified columns and no automatically generated ones.
++The following example uses manually specified columns to show a list of book information, +
+Pay attention to how item (row) styles and column styles cooperate together to affect the appearance of the cells in the datagrid.
-To be continued... +TBW: Control ID, Parent, NamingContainer, ViewState, ControlState, TWebControl, DataBound Control, ActiveControls
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page index c810708d..1a38c90d 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TDataGrid/Sample2.page @@ -4,22 +4,46 @@