Method getChecked does not exist on jQuery.yiiGridView

Cheers

I 'm trying to make a selection of rows in a gridview depending on whether the user selects a record in the grid .

I mean, if you selected a record in the grid , depending on the need to verify the selected record feha the records prior to the selected date .

when I use the line of code

$ ( " # Grid ’ ) yiiGridView ( ’ getChecked ', 7 ) . ; I get this error in the console js

GetChecked Method does not exist on jQuery.yiiGridView

apparently my yii.gridview.js file is not the last , I made update of composer and follows the same js file without yii.gridview features I need

Might be you can try this to get the selected rows in the gridview

var ids = $(’#w7’).yiiGridView(‘getSelectedRows’);

$(gridID).yiiGridView(‘getSelection’) - should be used to get selected rows

$(gridID).yiiGridView(‘getChecked’, columnID) - should be used to get checked rows

Related documentations:

http://www.yiiframework.com/doc/api/1.1/CGridView#selectableRows-detail

http://www.yiiframework.com/doc/api/1.1/CCheckBoxColumn#selectableRows-detail

ok, i tried the getSelectedRows, that work, but getSelection give this "Method getSelection does not exist on jQuery.yiiGridView"

i need to use other function like getChecked, getColumn… and it does not work,

i seems like no function exist… the .js file it’s from 2008… i update composer and yii2 but the file does not have that function… help please

You are mixing gridview.js from Yii 1.1 with that from Yii 2.0

Also the links to the documentation provided by WatsonG are from Yii 1.1, not from Yii 2.0

ok thank. i understood. will open new topic.

http://www.yiiframework.com/forum/index.php/topic/69639-how-can-i-use-jquery-to-update-columns-in-a-gridview/