EasyUI Forum
April 23, 2024, 12:26:19 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: Combogrid Hide Pagination in Scrollview & also changing form data variable  (Read 3549 times)
akashana
Newbie
*
Posts: 23


View Profile
« on: November 15, 2019, 04:53:17 AM »

Hi,

I have 2 questions

1. Combogrid with load-on-demand works perfectly. We want to hide the pagination row and therefore, we set pagination=false, but then data is not being loaded.  How can we achieve that ?

2. When we scroll, the URL is called with form data with variables rows & page. Is it possible to change form data variables  from rows to rowNo and page to pageNo ? we have few api that accept rowNo & pageNo as parameters.


Code:
			$('#tt').combogrid({
panelWidth:800,
method: 'POST',
url: 'ourUrl',
idField:'id',
textField:'text',
fitColumns:true,
view:scrollview,
multiple: true,
mode:'remote',
fitColumns:true,
pagination:true,
pageSize: 50,
columns:[[
{field:'id',title:'ID',width:80},                     
{field:'text',title:'Name',width:80,align:'left'},
]],
loadFilter: function (data) {                       
    return {
        total: data.TotalRecords,
        rows: data.Data,
    }
},
                });

Thanks,
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: November 15, 2019, 06:56:57 PM »

Call 'getPager' method on the datagrid to get the pagination object and hide it.
Code:
$('#cg').combogrid({
    pagination:true,
    onBeforeLoad: function(param){
        param.rowNo = param.rows;
        param.pageNo = param.page;
    }
})
var grid = $('#cg').combogrid('grid');
grid.datagrid('getPager').hide()
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!