Unselect row in CGridView

Hello,

I am trying to do something pretty simple, but I don’t really know how to do.

I have a CGridView with a CGridColumn and a clickable column (with an onclick event on it).

I would like that, when you click on the clickable column, it only triggers the javascript event without changing the selection.

So, what I was thinking of doing was to add a line in my javascript in the onclick to check if the row is selected or not and change its selection, so that it "cancels" the previous click for the selection.

Anyway, to do that, I guess I need to use functions from $.fn.yiiGridView but I don’t know which ones.

So I’m open for any alternative solution (because I don’t like mine that much !) and I am also looking for the list of the functions of $.fn.yiiGridView (I never found them !)

(I tried to do my best to explain my problem, but as I don’t even explain things well in French, it must be 10 times worst in English, so you can ask for anything you didn’t understand !)

Thanks !

If you set ‘selectableRows’ => 2 for both CGridView and CCheckBoxColumn they are separated. But I bet that won’t solve your issue. :)

No I don’t think !

I don’t want them to be separated at all :slight_smile:

i just want to unselect a row when it gets selected by clicking the clickable column. (What I’m saying seems so incomprehensible !)

Hey,

Even if there is easy solution right now, where can I find the list of the javascript functions for the gridview. (functions like : $.fn.yiiGridView)

Thanks !