EasyUI Forum
November 06, 2025, 06:47:15 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: pagination button visible on demand  (Read 6554 times)
jaimi
Full Member
***
Posts: 121


View Profile
« on: February 05, 2015, 11:08:06 PM »

I want the buttons of a pagination to be visible/invisible on the basis of the loaded data.
How to?

My pagination:

var PferdPager = $('#edgZuchtperiode').datagrid('getPager');   
  PferdPager.pagination({
    showPageList: false
   ,showRefresh : false
   ,displayMsg  : '{from} bis {to} von {total} Zuchtperioden'
   ,buttons:[
   {iconCls:'icon-add'     ,tooltip: 'Zuchtperiode beginnen',handler:function(){addZuchtperiode();}}
   ]
  });//PferdPager

I tried the following at datagrid:

...
 ,onLoadSuccess:function(data){
   var rowsLength = data.rows.length;
   
    if (rowsLength > 0){
     var curRow, vZUP_END;
   
    for (var rowIndex = 0; rowIndex <= rowsLength; rowIndex++){
     curRow = data.rows[rowIndex];
     vZUP_END = curRow.ZUP_END;
     if (!vZUP_END) {->>the button of pagination should be invisible<<-}
    }//for
...

But I realized, that the pagination is loaded first.
THX. Jaimi
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!