EasyUI Forum
March 29, 2024, 02:50:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid and Pagination update pageSize  (Read 4770 times)
sky-t
Full Member
***
Posts: 145


View Profile
« 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!!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 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');
  }
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!