as someone in another topic said, “I did my best to search for answers but didn’t find the a solution”.
First, I am newbie in Yii.
I have 2 frames, the 1st has a CGridView component that print data from MySql tables. My goal is when I click on a row in CGridView, let I know in the 2nd frame which rows where selected.
I have the CGridView with multiple selection, the frames, and read that selectionChanged is a “a javascript function that will be invoked after the row selection is changed. The function signature is function(id) where ‘id’ refers to the ID of the grid view. In this function, you may use $.fn.yiiGridView.getSelection(id) to get the key values of the currently selected rows.”
My problem is, I don’t know how to use selectionChanged function.
I have CGridView with where the ‘selectableRows’ property is ‘2’, so more rows can be selected. The $.fn.yiiGridView.getSelection(target_id) returs a list with the selected ids, but - and this is my problem - it is ASC-ordered. But I need to know the last id that user clicked. How can I get it?
I tried to search the answer for this question, but i didn’t find it. Please, if someone know, reply. Thank you