creating a dropdown gfor paging

hi guys please help me out…What am i doing is creating a dropdown on above of the cgrid view so that when the user selects the no.of rows then that many rows get displayed tin that formmmm…So the basic problem which is occuring is ajax uodate I am using

the following code on onchange event of the dropdown:

Yii::app()->getClientScript()->registerScript(“Group_testpagesize”,"$(’#Group_testpagesize’).change(function(){

																											$.fn.yiiGridView.update('testwidget', {


            type:'Get',


            url:encodeURI('index.php?r=group/mygroups&Group[testpagesize]='+$(this).val()),


            success:function(data) {


                    $.fn.yiiGridView.update('testwidget');


					


            },


            error:function() {alert('error');


            }


    });


    return false;


																											});",CClientScript::POS_READY);

1)it is getting refreshed two times

2)it is not updating my records

My search function in the model is

public function search()

{


	// Warning: Please modify the following code to remove attributes that


	// should not be searched.


	


	//$this->modified_on=date('Y-m-d',strtotime($this->modified_on));


	$userid=Yii::app()->user->getId();


	$criteria=new CDbCriteria;


	


	 $userid=Yii::app()->user->getId();


	 


	 $criteria->condition='vuser_id=:vuser_id and delete_flag=:delete_flag';


	 $criteria->params=array(':vuser_id'=>$userid,':delete_flag'=>'0');


	 $criteria->compare('id',$this->id);


	 $criteria->compare('group_title',$this->group_title,true);


	 $criteria->compare('created_on',$this->created_on,true);


	 $criteria->compare('modified_on',$this->modified_on,true);


	


	if(isset($_GET['Group']['testpagesize']))


	{


		echo $pagesize=$_GET['Group']['testpagesize'];


	}


	else


	{


		echo $pagesize=5;


	}





	/*$criteria->compare('delete_flag',$this->delete_flag,true);

*/

		return $dataProvider=new CActiveDataProvider('Group',


												array('criteria'=>$criteria,


														


												 		'pagination'=>array('pageSize'=>$pagesize),


													   )


										 );


}   

the parameters and everythhing is fine but not the updation please helllpppppppppppppppppppppppp asap

please anyone help me out

Mike already solved that a while ago… check this thread - http://www.yiiframework.com/forum/index.php?/topic/8994-

hey i solved it out yipeeeeeeeeeeeeeeeeeeeee

i did it in a diff way but solved it out m happy…thanks mdomba you are a real helperrrrrrr a very active memeber of the forums to help us outttttttttttttt

Thank you… I’m glad you solved it your way… would be nice if you can post your solution here so other users in the future can use it…

NOTE: when posting code, to be more readable use the code directive (<> on the editor toolbar)

can u please show me the way how to use viewbuttonoptions in cbuttoncolumn.Please reply asap.I sahll be really thankful to you

It’s a general rule that one thread is related to one problem… so to have better organization of problem/solution for future users with similar problem(s)…

viewButtonOptions is used like htmlOptions in other components…

but i am using $data->id in the options and it is not workinggggggg…Please help

You cannot use $data everywhere… check the documentation… $data can be used only where it is specified like in viewButtonUrl - http://www.yiiframework.com/doc/api/1.1/CButtonColumn#viewButtonUrl-detail

then how to give unique id to the buttonssss…is there any way

please help

any one …

Please note that just posting short messages in short periods of time like you are doing is not helpful to anyone… I already wrote you that it’s not good to ask different questions on same thread… for new problems open a new thread… and before writing “anyone” or “please help” at least wait one day…

Understand that this is not a support board where you must get an answer as soon as you post a question!

ok