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
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