JS Problem

HI Guys,

Need your help with CGridview . I need to run a particular action on select of a row. So i have set selectableRows=>1 and selectionChanged=>my js, my problem is that the action runs the 1st time but then on change of the selection in the grid i get a js error saying

“Uncaught TypeError: Cannot call method ‘getSelection’ of undefined” where the getselection is a gridview function to get the id of the row which is in the js function i have created.

The js function basically return a partial view.

Can you guys pls help me resolve this. All the other js request are also unbinded except for the one from the render partial page.

P.S. even the button column actions run only once

Hi.

Try http://www.yiiframework.com/wiki/323/dynamic-parent-and-child-cgridciew-on-single-view-using-ajax-to-update-child-gridview-via-controller-with-many_many-relation-after-row-in-parent-gridview-was-clicked/

Your problem is explained in the section: The ajax in the separately loaded javascript file - called customFunctions.js