Why after selected yiiGridView('getSelectedRows') can't get keys

Hello everyone

Why Click gridview header row checkbox to select all can’t get keys .?

Instead, cancel the whole post-election can get to all the keys




$(document).on('change', 'input[type=checkbox]', function () {

      var keys = $('#data-list').yiiGridView('getSelectedRows');

      console.log(keys);

});



thanks ~