summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TCheckBoxColumn.php
diff options
context:
space:
mode:
authorxue <>2006-08-27 14:45:57 +0000
committerxue <>2006-08-27 14:45:57 +0000
commit304427074ddf629fd2708b23a3fe0cd0122c05a8 (patch)
tree49e86b72451444cb632d38b82ab4e6399ff156ec /framework/Web/UI/WebControls/TCheckBoxColumn.php
parent17f7daf67672f2d2252d9199451fe873d61c2c7a (diff)
Cells in TDataGrid rows can now be accessed via the corresponding column IDs.
Input controls in some datagrid columns can now be accessed in a named fashion.
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBoxColumn.php')
-rw-r--r--framework/Web/UI/WebControls/TCheckBoxColumn.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBoxColumn.php b/framework/Web/UI/WebControls/TCheckBoxColumn.php
index 4df1e695..d7fac8cf 100644
--- a/framework/Web/UI/WebControls/TCheckBoxColumn.php
+++ b/framework/Web/UI/WebControls/TCheckBoxColumn.php
@@ -28,6 +28,15 @@ Prado::using('System.Web.UI.WebControls.TCheckBox');
* TCheckBoxColumn will display an enabled checkbox provided the cells are
* in edit mode. Otherwise, the checkboxes will be disabled to prevent from editting.
*
+ * The checkbox control in the TCheckBoxColumn can be accessed by one of
+ * the following two methods:
+ * <code>
+ * $datagridItem->CheckBoxColumnID->CheckBox
+ * $datagridItem->CheckBoxColumnID->Controls[0]
+ * </code>
+ * The second method is possible because the checkbox control created within the
+ * datagrid cell is the first child.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
@@ -87,6 +96,7 @@ class TCheckBoxColumn extends TDataGridColumn
$checkBox->setEnabled(false);
$cell->setHorizontalAlign('Center');
$cell->getControls()->add($checkBox);
+ $cell->registerObject('CheckBox',$checkBox);
if($this->getDataField()!=='')
$checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn'));
}