CGridview SelectionChanged

Hi all!

I have the following scenario:

  1. a CGridview (‘id’=>‘test-grid’)

  2. an integrated CCheckboxColumn in the GridView

  3. some data row in the Gridview coming from a MySQL database table.

  4. data rows in the GridView can be selected or unselected through clicking on a checkbox.

Now, whenever the set of selected/unselected rows has changed I want to

send the array of Ids of selected rows to the controller for further processeing

using ajax POST method.

According to Yii docu, this is possible using function(id) and $.fn.yiiGridView.getSelection(id)

My JavaScript skills are very limited. How can I solve this problem?

Would please any one help me with code snippets

Thanks in advance.

Any help? suggestion plz?


the main suggestion I can give is improve your js knowledge or hire some one …

generally you need to get the id, go to the row in the grid and read the data of the row, and submit it via ajax.

Consider create your own javascript for this… catch the onchange search for closest tr, fine the id in the first row, collect selected data and send…


You know, I can’t learn JS in a day or two.

You know,sometimes, you just wont to solve a particular problem

whithout digging deep in the involved technology because of lack of


Thank you any way for advise + and tipps.