|
Title: pagination button visible on demand Post by: jaimi 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 |