Monday, September 2, 2013

Include yiiGridView Javascript

http://chevronscode.com/yii-include-preload-yiigridview-javascript/

I ended up with the following code at the top of the page (since I'm not using a layout):

Yii::app()->clientScript->registerCoreScript('jquery');
$assetsScriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('zii.widgets.assets'));
Yii::app()->getClientScript()->registerScriptFile($assetsScriptUrl .'/gridview/jquery.yiigridview.js');

No comments:

Post a Comment