Yii Framework Forum: Could anyone tell me how to include the css file style.css of cgridview in a page? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Could anyone tell me how to include the css file style.css of cgridview in a page? Rate Topic: -----

#1 User is offline   @lex p&ian 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 16-December 11
  • Location:India

Posted 22 August 2012 - 02:44 AM

I am working on a mini project where i have designed a custom table for reports.

I need exact table design of cgridview. I added necessary classes in div ( class="grid-view" ) and table ( class="items").

But i have no idea about how to include the cgridview css (gridview/style.css from yii/framework folder).

Thanks in advance
0

#2 User is offline   onkar lal 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 13-September 11
  • Location:India

Posted 22 August 2012 - 03:11 AM

This could be your solution.

<?php
$baseScriptUrl=Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets'));

Yii::app()->clientScript->registerCssFile($baseScriptUrl.'/gridview/style.css');  
?>


0

#3 User is offline   @lex p&ian 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 16-December 11
  • Location:India

Posted 22 August 2012 - 03:25 AM

View Postonkar lal, on 22 August 2012 - 03:11 AM, said:

This could be your solution.

<?php
$baseScriptUrl=Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets'));

Yii::app()->clientScript->registerCssFile($baseScriptUrl.'/gridview/style.css');  
?>




Thank You. It works.. Thanks a lot
Need to add styles.css
Yii::app()->clientScript->registerCssFile($baseScriptUrl.'/gridview/styles.css');
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users