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:


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



            success:function(data) {




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



    return false;


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.




	$criteria=new CDbCriteria;




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









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




		echo $pagesize=5;




		return $dataProvider=new CActiveDataProvider('Group',







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 -

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 -

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!