I have a grid with toolbar style pager, I need to save in cookies perpage number (perpagenum) and then after grid loaded I need to set perpagenum from cookies.
E.g. I want to show 20 records on page instead of 5 (by default) and if I select 20 I write it to cookie with no problem, but how can I load pager with this value (perpagenum=20).
var tb=this.descrGrid.aToolBar;
tb.attachEvent("onClick", function(itemId){
var item = itemId.split('_');
if(item[0] == 'perpagenum') {
Cookie.write('pageSize', item[1], {duration: 365});
}
});
var pageSize = Cookie.read('pageSize'); // get size from cookie
// i tryed next line, but it doesn't load the pager and selects value in list only
tb.setListOptionSelected('perpagenum', 'perpagenum_' + pageSize); // doesn't help