EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: sky-t on March 22, 2017, 02:21:13 AM



Title: Datagrid and Pagination update pageSize
Post by: sky-t on March 22, 2017, 02:21:13 AM
Hi there,

i want to use datagrid with pagination where the pagination has no layout using layout: []
how can i realize that the pageSize allways has the same value then the total number of rows,
so allways all rows where shown in the datagrid?


Thank you!!


Title: Re: Datagrid and Pagination update pageSize
Post by: jarry on March 22, 2017, 11:31:12 PM
If you set the 'layout:[]' property for the pagination, nothing displays on the page bar. If you only want to display page information on the bottom of the datagrid, please try to use the 'footer' instead.
Code:
$('#dg').datagrid({
  footer: $('<div>0 rows</div>'),
  onLoadSuccess: function(data){
    var f = $(this).datagrid('getPanel').panel('footer');
    f.html(data.rows.length+' rows');
  }
})