diff options
author | xue <> | 2006-06-28 01:36:35 +0000 |
---|---|---|
committer | xue <> | 2006-06-28 01:36:35 +0000 |
commit | 98ffb7a2cb6144de626093bdf5009444661f957c (patch) | |
tree | 9ac4a08f547dc21312e3bd8f70cdf8be017bc3d1 /framework/Web/UI/WebControls | |
parent | ae57f5fb591ecc01c9cb007c4517efa5c4ff9e72 (diff) |
Fixed #256, #257.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 2 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataGridColumn.php | 22 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TDataList.php | 2 |
3 files changed, 24 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index 342a39ac..f811edaf 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -634,7 +634,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer if(strcasecmp($command,self::CMD_SELECT)===0)
{
$this->setSelectedItemIndex($param->getItem()->getItemIndex());
- $this->onSelectedIndexChanged(null);
+ $this->onSelectedIndexChanged($param);
return true;
}
else if(strcasecmp($command,self::CMD_EDIT)===0)
diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php index e43b4895..fcb2e261 100644 --- a/framework/Web/UI/WebControls/TDataGridColumn.php +++ b/framework/Web/UI/WebControls/TDataGridColumn.php @@ -51,10 +51,32 @@ Prado::using('System.Util.TDataFieldAccessor'); */
abstract class TDataGridColumn extends TApplicationComponent
{
+ private $_id='';
private $_owner=null;
private $_viewState=array();
/**
+ * @return string the ID of the column.
+ */
+ public function getID()
+ {
+ return $this->_id;
+ }
+
+ /**
+ * Sets the ID of the column.
+ * By explicitly specifying the column ID, one can access the column
+ * by $templateControl->ColumnID.
+ * @param string the ID of the column.
+ */
+ public function setID($value)
+ {
+ if(!preg_match(TControl::ID_FORMAT,$value))
+ throw new TInvalidDataValueException('datagridcolumn_id_invalid',get_class($this),$value);
+ $this->_id=$value;
+ }
+
+ /**
* @return string the text to be displayed in the header of this column
*/
public function getHeaderText()
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php index b6888225..48392b1d 100644 --- a/framework/Web/UI/WebControls/TDataList.php +++ b/framework/Web/UI/WebControls/TDataList.php @@ -677,7 +677,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs if(strcasecmp($command,self::CMD_SELECT)===0)
{
$this->setSelectedItemIndex($param->getItem()->getItemIndex());
- $this->onSelectedIndexChanged(null);
+ $this->onSelectedIndexChanged($param);
return true;
}
else if(strcasecmp($command,self::CMD_EDIT)===0)
|