Hello,
I must be missing something simple, but I can't seem to get the igx-paginator template to work. My app won't even build if I add it in. I get the following error:
"Can't bind to 'page' since it isn't a known property of 'igx-paginator'."
Am I missing some type of hook up?
I was basing it off of the example given here: https://stackblitz.com/angular/gkpvooerkqd?file=src%2Fapp%2Fgrid%2Fgrid-pager-sample%2Fgrid-pager-sample.component.html
Here are the relevant (I think) bits of code/config. If I'm missing anything you would need to see, let me know. Thanks
NOTE: I've stripped out code that retrieves my data, so assume that the data is there. The data populates just fine.
package.json:
"igniteui-angular": "9.0.4",
imports: [ CoreModule ]
import { IgxGridModule } from 'igniteui-angular'; @NgModule({ imports: [ IgxGridModule, ], exports: [ IgxGridModule ] }) export class CoreModule { }
<igx-grid #workDataGrid id="workDataGrid" [data]="workResults" [paging]="true" [height]="'650px'" (onCellEdit)="cellEditCommit()" [width]="'100%'" [primaryKey]="'WorkId'" [perPage]="10" [paginationTemplate]="pager" height="500px" width="100%" displayDensity="cosy" > </igx-grid> <ng-template #pager> <igx-paginator #paginator [(page)]="workDataGrid.page" [totalRecords]="workDataGrid.totalRecords" [(perPage)]="workDataGrid.perPage" [dropdownHidden]="isDropdownHidden" [pagerHidden]="isPagerHidden" [selectLabel]="'Records per page:'" [dropdownEnabled]="!isDropdownDisabled" [pagerEnabled]="!isPagerDisabled" [selectOptions]="selectOptions" [displayDensity]="grid.displayDensity"> </igx-paginator> </ng-template>
export class WorkComponent implements OnInit { workResults: any[]; public densityOptions: string[]; public isDropdownHidden = false; public isPagerHidden = false; public isDropdownDisabled = false; public isPagerDisabled = false; public selectOptions = [5, 15, 20, 50]; ngOnInit() { this.densityOptions = ["compact", "cosy", "comfortable"]; } }
Hello Jason,
I am glad that you were able to solve your issue. I will close this case now. Please keep in mind that closed cases can be reopened within 30 days of closure
Thank you for using Infragistics components.
Regards, Monika Kirkova, Infragistics
Hi Monika, I believe there were some version conflicts going on in my environment. I updated a lot of packages and it is now working properly. Thanks for the help.
Having in mind that the same code is working as expected on my side I believe there is something in your environment that causes the difference in the behavior. In order to be able to investigate this matter further and find the root cause of the issue could you please provide me a sample of your own. Remove any external dependencies and code that is not directly related to this behavior. This is going to be highly appreciated and helpful.
Looking forward to hearing from you.
Hi Monika,
Thanks for catching the naming slip up. I had originally had all of the names straight but going back and forth between paging and no paging I missed that one.
I have corrected the name but that didn't make a difference. I then copied the grid and template definitions from your stackblitz but I'm still getting the same error.
After investigating this further, I noticed that in the igx-paginator tag there is a mismatch in the id:
[displayDensity]="grid.displayDensity" , however, your grid is workDataGrid. This is the only difference that I see. If it is still not working, I have prepared a sample with your grid’s name and properties, only the data is different.
Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce.