I have an ajax link on click of which m doing renderParital of Clistview…
here’s my ajax link…
echo CHtml::ajaxLink('FAVOURITES',
array('Favourites/account_favourite/'.$Member_ID), // the URL for the AJAX request. If empty, it is assumed to be the current URL.
array('update'=>'#detail_data',
'beforeSend' => 'function(){
$("#loader").removeClass("beforeloading");
$("#loader").addClass("loading");}',
'type' =>'POST',
),array('class'=>'ajaxtabs','id'=>'favouritesactive'));
?>
And this is the function whick the ajax link calls…
public function actionAccount_favourite($id)
{
$criteria=new CDbCriteria;
$criteria->select = "*";
$criteria->join="inner join favourites f on t.News_ID=f.Post_ID and f.Type='News'";
$criteria->condition="f.member_ID=".$id;
$dataProvider=new CActiveDataProvider('News',array('criteria'=>$criteria, 'pagination'=>array(
'pageSize'=>5,
),
view account details has the clist view… it loads but takes a long time… any clue why this happens? if i set the last parameter of renderpartial as false it loads fast… but i cannot do that cos then clistview pagination fails…