EasyUI Forum
May 08, 2024, 05:47:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug with datagrid methode getPager  (Read 10445 times)
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« on: May 08, 2014, 02:43:22 AM »

Since Version 1.3 we can set the pagePosition on datagrid. This defines the position of the pager bar. When i set pagePosition='both' the pagination is shown on top and bottom. That's working.

But when I add user defined buttons to the pageination like the following code, the buttons are only on the pagination at the datagrid bottom!
This looks like a bug.

Code:
var pager = $('#dg').datagrid('getPager');
pager.pagination({ // get the pager of datagrid
  buttons: $('#custommerButtons')
});

<div id="custommerButtons"> 
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" ><%=lang.get("tbNew")%></a> 
    <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" ><%=lang.get("tbSave")%></a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" ><%=lang.get("tbDelete")%></a> 
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true"><%=lang.get("tbCancel")%></a> 
</div>
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 08, 2014, 07:45:25 AM »

Please try the code below to solve your issue.
Code:
var pager = $('#dg').datagrid('getPager');
pager.each(function(){
$(this).pagination({
buttons: $('#custommerButtons').clone()
})
})
Logged
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« Reply #2 on: May 09, 2014, 06:51:35 AM »

Hello. That works fine.

Please try the code below to solve your issue.
Code:
var pager = $('#dg').datagrid('getPager');
pager.each(function(){
$(this).pagination({
buttons: $('#custommerButtons').clone()
})
})


If I use extra configuration array it's works also
Code:
	$('#dg').datagrid('getPager').pagination({
    buttons:[{
        iconCls:'icon-add',
        text: 'tbNew',
        handler:function(){
        }
    },{
        iconCls:'icon-edit',
        text: 'tbEdit',
        handler:function(){
        }
    }]
    });


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!