"settings Is Not Defined" When Trying To Use "getselection" On Gridview

I have one gridview on this page that’s loaded normally, not through ajax or anything like that. When I try to use the following code to get the selected row, nothing happens and I see the error “settings is not defined” in Firebug.

'selectionChanged' => 'function(id){

        row = $(id).yiiGridView("getSelection");



Any ideas? How can I see if the settings are set? Thanks!


Same issue exists in a new app with a form generated in gii. Am I using the "getSelection" function wrong or something?

Try this:

'selectionChanged' => 'function(id){


        var row = $("#"+id).yiiGridView("getSelection");



the “id” parameter doesn’t include the hashmark (# - id selector in jQuery)