How Filter Setup With Tbjsongridview?

Hi,

Anyone can please help with this …




// _grid.php


$this->widget('bootstrap.widgets.TbJsonGridView', array(

	'id'=>'rss-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	//bootstrap

	'type' => 'striped bordered condensed',

	'responsiveTable' => true,

	'json' => true,

	'enableSorting'=>true,

	'ajaxUpdate'=>true,

	'cacheTTL' => 10, // cache will be stored 10 seconds (see cacheTTLType)

	'cacheTTLType' => 's', // type can be of seconds, minutes or hours

	

	'summaryText' => false,

	'columns'=>array(

		array(

			'header'=>'ID',

			'name'=>'id',	

			'htmlOptions'=>array('width'=>'20'),

			'headerHtmlOptions'=>array('width'=>'20'),

		),

		'RssName',

		array(

		             'name'=>'Category', 

		             'value'=>'$data->Cat->name',

		             'filter' => CHtml::listData(Category::model()->findAll(), 'id','name'),

		             ),

		'RssLogo',

		array(

			'header' => 'Edit',

			'class' => 'bootstrap.widgets.TbJsonButtonColumn',

			'template' => '{view} {update} {delete}',

                'buttons' => array(

                    'delete' => array(

                        'click' => 'function(){return false;}'

                    )

                )

		),

	),

)); ?>






// model controller


	public function actionAdmin()

	{

		$model=new Rss('search');

		$model->unsetAttributes();  // clear any default values

		if (Yii::app()->getRequest()->getIsAjaxRequest()) {

     		header( 'Content-type: application/json' );

     		$this->renderPartial('_grid', compact('model'));

     		Yii::app()->end();

     		}


		if(isset($_GET['Rss'])) $model->attributes=$_GET['Rss'];


		$this->render('admin',array('model'=>$model,));

	}




the admin view has the form also, now changing the ‘Category’ result js error, how to achive this ?

THX.

Come on … no one used filter with TbJsonGridView ?!

silence of the lambs … :rolleyes: