HI Yii geeks,
I am seeking help on implementing a hover effect on yii cgridview…
what i have is a gridview with more than 100 rows…
when hovering on each row i need to display a div or at least the customized html title tag…
to get that done… i had to extend the yii cgridview and overrride the beoreRender method.
/**
* Renders a table body row.
* @param integer $row the row number (zero-based).
*/
public function renderTableRow($row) {
if ($this->rowCssClassExpression !== null) {
$data = $this->dataProvider->data[$row];
$title = '';
if ($this->rowTitle !== null)
$title = 'title='.$this->evaluateExpression($this->rowTitle, array('row'=>$row, 'data'=>$data));
echo '<tr '.$title.' class="'.$this->evaluateExpression($this->rowCssClassExpression, array('row'=>$row, 'data'=>$data)).'">';
} else if (is_array($this->rowCssClass) && ($n = count($this->rowCssClass)) > 0)
echo '<tr class="'.$this->rowCssClass[$row % $n].'">';
else
echo '<tr>';
foreach ($this->columns as $column)
$column->renderDataCell($row);
echo "</tr>\n";
}
then i am able to pass the title for each row this way…
'dataProvider'=>$dataProvider,
‘rowTitle’=>’$data->id’,
what happens is, i get the title tag with the data loaded but need to customized the html title tag (on hover aftre some time only this comes) or else i need to display a div with appropriate data when hovering on each row…
can anyone please throw me piece of bone to get this done…
any quick help is highlight appropriated.