Does not work correctly, default page num stays 0. My code is
<table class="easyui-datagrid"
id="${_id}"
data-options="
url:'${request.resource_url(_context, 'list')}',border:false,
pagination:true,fit:true,pageSize:50,singleSelect:true,
rownumbers:true,sortName:'id',sortOrder:'desc',
pageList:[50,100,500],idField:'_id',checkOnSelect:false,
selectOnCheck:false,toolbar:'#${_tb_id}',
view: detailview,
onExpandRow: function(index, row){
var row_id = 'row-${_id}-' + row.id;
$('#' + row_id).load(
'/suppliers/details?id=' + row.id,
function(){
$('#${_id}').datagrid('fixDetailRowHeight', index);
$('#${_id}').datagrid('fixRowHeight', index);
}
);
},
detailFormatter: function(index, row){
var row_id = 'row-${_id}-' + row.id;
return '<div id=' + row_id + '></div>';
},
onBeforeLoad: function(param){
$.each($('#${_s_id}, #${_tb_id} .searchbar').find('input'), function(i, el){
param[$(el).attr('name')] = $(el).val();
});
}
" width="100%">
<thead>
% if _context.has_permision('delete'):
<th data-options="field:'_id',checkbox:true">${_(u"id")}</th>
% endif
<th data-options="field:'id',sortable:true,width:60">${_(u"id")}</th>
<th data-options="field:'name',sortable:true,width:200">${_(u"name")}</th>
<th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"updated")}</strong></th>
<th data-options="field:'modifier',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"modifier")}</strong></th>
</thead>
</table>