Issue
This is my code ..I am using version 4.1.1
AngularSlickgridModule.forRoot({
registerExternalResources: [new ExcelExportService()],
enableAutoResize: true,
enableGridMenu: true,
enableExcelExport:true,
autoHeight: true,
alwaysShowVerticalScroll: false,
autoResize: {
rightPadding: 10,
container: '#grid-container',
bottomPadding: 20,
minHeight: 250,
maxWidth: 900,
minWidth: 200
},
enableFiltering: true,
enablePagination: true,
pagination: {
pageSizes: [],
pageSize: 10,
totalItems: 0,
},
}),
],
Page size in showing in 10,25,50....100
But I need custom pagination so i added pageSizes: [10,50,100,1000],
But it showing defalt pages (except 10) and 1000,2000...
and also not in sort order..Is im doing wrong ..Pls let me know
EDIT : After chhange to below code it showing like this..it also showing default page size of slickgrid..
pagination: {
pageSizes: [10, 200, 250, 500, 5000],
pageSize: 10
},
Solution
You have a typo in your page sizes, it won't work with decimal numbers and your pageSize
must be a valid number that is included in pageSizes
but isn't in your case because of the decimal number, it works fine in the lib as shown by Example 30
this.gridOptions = {
enablePagination: true,
pagination: {
pageSize: 10,
pageSizes: [10, 200, 250, 500, 5000]
},
};
Answered By - ghiscoding
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.