Difference between #6 and #7 of
Display Status image on CGridView column

Changes

Title unchanged

Display Status image on CGridView column

Category unchanged

Tutorials

Yii version changed

1.1

Tags changed

Status, admin, image,CGridView, gridview, imageadmin,Status

Content changed

[...]
First you can create the **UtilityHtml.php** file in componet folder. (Otherwise which call a common file)

Put the below function in UtilityHtml.php file:


```php

public static function getImagetitle($status) {
if ($status == 1 || strtolower($status) == 'yes') {
[...]
and display the grid view on admin.php file


```php

array(
'name'=>'is_active',
'filter'=>array('1'=>'Active', '0'=>'Inactive'),
'type'=>'html',
'value'=>'CHtml::tag("div", array(
[...]
0 0
5 followers
Viewed: 21 280 times
Version: 1.1
Category: Tutorials
Written by: Ankit Modi
Last updated by: samdark
Created on: Jul 22, 2013
Last updated: 5 years ago
Update Article

Revisions

View all history