mavs1971
(Mvillalonga)
1
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
sukunj
(Mendparasukunj27)
2
Might be you can try this to get the selected rows in the gridview
var ids = $(’#w7’).yiiGridView(‘getSelectedRows’);
WatsonG
(Watson)
3
$(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
mavs1971
(Mvillalonga)
4
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
mdomba
(Maurizio Domba Cerin)
5
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
mavs1971
(Mvillalonga)
6