summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TDataGrid.php
diff options
context:
space:
mode:
authorxue <>2006-07-21 16:14:01 +0000
committerxue <>2006-07-21 16:14:01 +0000
commitc0d9d27f16bae2e428225302da144e9cc6d4adc8 (patch)
treeef7b611d7c87931a3fcfcaf9e4cbb94641640f63 /framework/Web/UI/WebControls/TDataGrid.php
parent0c16571c091f8c4c89ae18427b2c2994cd4cf3bb (diff)
merge from 3.0 branch till 1281.
Diffstat (limited to 'framework/Web/UI/WebControls/TDataGrid.php')
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index f7697fec..2687ac35 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -43,6 +43,12 @@ Prado::using('System.Web.UI.WebControls.TPanel');
* To change the state of an item, set {@link setEditItemIndex EditItemIndex}
* or {@link setSelectedItemIndex SelectedItemIndex} property.
*
+ * Each datagrid item has a {@link TDataGridItem::getItemType type}
+ * which tells the position and state of the item in the datalist. An item in the header
+ * of the repeater is of type 'Header'. A body item may be of either
+ * 'Item', 'AlternatingItem', 'SelectedItem' or 'EditItem', depending whether the item
+ * index is odd or even, whether it is being selected or edited.
+ *
* A datagrid is specified with a list of columns. Each column specifies how the corresponding
* table column will be displayed. For example, the header/footer text of that column,
* the cells in that column, and so on. The following column types are currently
@@ -128,6 +134,14 @@ Prado::using('System.Web.UI.WebControls.TPanel');
* every newly created datagrid item. You can respond to this event to customize
* the content or style of the newly created item.
*
+ * Note, the data bound to the datagrid are reset to null after databinding.
+ * There are several ways to access the data associated with a datagrid row:
+ * - Access the data in {@link onItemDataBound OnItemDataBound} event
+ * - Use {@link getDataKeys DataKeys} to obtain the data key associated with
+ * the specified datagrid row and use the key to fetch the corresponding data
+ * from some persistent storage such as DB.
+ * - Save the data in viewstate and get it back during postbacks.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls