I need to show all the records in the grid on clicking of the show all button on the paging toolbar docked at the bottom.
Tried adding load with param yet the grid will not refresh with all the records.
Can you help me with what else am i missing in this ?
ds.load({params:{start:0,limit:iCnt }});
Tried above but still no luck
grid.addDocked({
xtype: 'pagingtoolbar',
dock: 'bottom',
pageSize: 50, //maxRowCnt,//Pagesize set
store: grid.getStore(),//Grid's store set
displayInfo: true,//Display the records information
displayMsg: 'Displaying Records {0} - {1} of {2}',
emptyMsg: "No records to display",
items: [
{
pressed: false,
enableToggle:false,
cls: 'x-btn-text',
text: 'Show All',
tooltipType: 'title',
tooltip: ' Show all records ',
handler:showAllFunc
}]
});
showAllFunc = function() {
var grid = ColdFusion.Grid.getGridObject("mainGrid");
var ds = grid.getStore();
var iCnt = ds.getTotalCount();
ds.load({params:{start:0,limit:iCnt }});
grid.getView().refresh();
grid.getDockedItems('toolbar[dock="bottom"]')[1].updateInfo();
}