Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor doc and code corrections for CCheckBoxColumn

  • Loading branch information...
commit 6d21f82f5f35437bff0b13aaf6336972756abd0e 1 parent 73a4003
@samdark samdark authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 framework/zii/widgets/grid/CCheckBoxColumn.php
View
8 framework/zii/widgets/grid/CCheckBoxColumn.php
@@ -56,7 +56,8 @@ class CCheckBoxColumn extends CGridColumn
* @var string a PHP expression that will be evaluated for every data cell and whose result will
* determine if checkbox for each data cell is disabled. In this expression, the variable
* <code>$row</code> the row number (zero-based); <code>$data</code> the data model for the row;
- * and <code>$this</code> the column object.
+ * and <code>$this</code> the column object. Note that expression result will
+ * overwrite value set with <code>checkBoxHtmlOptions['disabled']</code>.
* @since 1.1.13
*/
public $disabled;
@@ -211,10 +212,11 @@ protected function renderDataCellContent($row,$data)
$checked = false;
if($this->checked!==null)
$checked=$this->evaluateExpression($this->checked,array('data'=>$data,'row'=>$row));
- if($this->disabled!==null)
- $this->checkBoxHtmlOptions['disabled']=$this->evaluateExpression($this->disabled,array('data'=>$data,'row'=>$row));
$options=$this->checkBoxHtmlOptions;
+ if($this->disabled!==null)
+ $options['disabled']=$this->evaluateExpression($this->disabled,array('data'=>$data,'row'=>$row));
+
$name=$options['name'];
unset($options['name']);
$options['value']=$value;
Please sign in to comment.
Something went wrong with that request. Please try again.