Hello.
I created CGridView that shows cca 50 items per page, but totally there are 1500 items. I need to check (select) for example 200 rows and print them to PDF. But how can I select items on more pages using CCheckboxColumn?
The only solution that crosses my mind is to catch the event when checkbox on each row is checked and save to DB (or to session) some value indicating that this row will be printed. But how do I know which checkbox was unchecked so I can remove it from the list?
Important: Not all rows have checkbox. Not all records can be printed at the moment.
But what if user selects all available items on current page by clicking the checkbox in header? How do I know which rows where checked and unchecked? Is there some event for this? I need to store checked rows, allow user to switch page, check more rows and than print for example 85 rows at once.
Second solution could be to create a buffer in session and to move all checked rows to it by pressing a special button. When selection is done, printing can begin. But it is not comfortable.
var list = $.fn.yiiGridView.getChecked('CGridID','ColumnId');
$.each(list,function(index,value)
{
// do something
});
CGridID and ColumnId were set by attribute id:
'id'=>'myId'
Any ideas please?