Questions tagged [primeng-datatable]

Questions about the PrimeNG DataTable component from PrimeTek Informatics.

Useful Links

398 questions
5
votes
3 answers

how to get and set the current page number in primeNG datatable?

I am using primeNG datatable in my angular project. In one of my scenario I need to get the current page number of primeNG data table and pass that number to the next screen and when user navigate back to previous screen I want to set that page…
user3340357
  • 81
  • 1
  • 2
  • 6
5
votes
1 answer

How to change PrimeNG datatable expander icon

I am using PrimeNG datatable for my usage. Below is my code: How can I change the default icon for the…
Mukil Deepthi
  • 4,272
  • 9
  • 49
  • 107
5
votes
2 answers

Data table issue - ERROR TypeError: val.slice is not a function

ERROR TypeError: val.slice is not a function dataTable configuration $.p-dataTable #dt [value]="customers" [(selection)]="chkBoxSelect" dataKey="customerId" [rows]="10" [paginator]="true" paginatorPosition="both" [pageLinks]="5"…
Hari Konukuru
  • 61
  • 1
  • 1
  • 8
5
votes
1 answer

Get current page and move to specific page in NgPrime datatable

I am using datatable from primefaces - primeNg. Can I get the current page I am in and set the datatable to particular page programatically? I saw that datatable uses pagination component within, but how to access it using @ViewChild? Any help will…
zennith
  • 400
  • 2
  • 4
  • 17
5
votes
3 answers

How to add hyperlink to Primeng datatable column,angular 2 way

I am using Primeng datatable in my project setup.But i want the first column of all rows to be hyperlink,so that i can link those to the next pages using [routerLink] (angular 2 way).I am quite unable to achieve that... Is there any way to work…
4
votes
2 answers

PrimgNg: column sorting

I am using and I have to implement sorting to its headers. I am doing as below: HTML
Anna
  • 1,497
  • 6
  • 27
  • 52
4
votes
0 answers

Angular get reference to child component inside ng-template

I've created a wrapper component for PrimeNG data table to be able to handle all data table logic in one component. The component supports passing a template which is then used for expandable rows. In the template one can pass a custom template…
Daniel Grima
  • 2,396
  • 5
  • 29
  • 53
4
votes
2 answers

Primeng Datatable rowTrackBy

I have searched the web for a decent example of primeng datatable with rowTrackBy. Documentation is incomplete and does not say much. Is there anyone out there that can help?
pantonis
  • 3,471
  • 3
  • 39
  • 69
4
votes
5 answers

PrimeNG DataTable server-side paging

I'm currently working on an Angular 4 project and using the PrimeNG DataTable. So far this framework seems pretty neat, but I would like to make my paging server-side. That way I will load only 10,20,.. records at a time rather than loading all…
4
votes
0 answers

Multisort Datatable w/ fixed field and sort function

We have a PrimeNg datatable that has multiple columns (as most do), we need to be able to have a multiple sort happen when a user clicks on one of the 3 columns, but that column is only the first of two fields that it needs to sort on. The second…
BillF
  • 726
  • 7
  • 19
4
votes
3 answers

How to sort data in a PrimeNG DataTable with Row Grouping

What I want to do is to sort the data already grouped in alphabetical order or custom order. I used the sortField attribute which specify the groupheader order but I need to order the data inside the group too.
chrisblo
  • 598
  • 1
  • 8
  • 29
4
votes
1 answer

Angular4 PrimeNG DataTable Not Updating Despite Model Changes

I get an observable back from a data service to web api that returns an array and populates a data table in a parent component correctly. I pass the array used to populate the datatable to a child component via @Input. When a row on the parent…
xyntiacat
  • 438
  • 5
  • 12
4
votes
0 answers

p-dropdown filter is not working in p-dataTable when data is binded with lazy

When I bind data to p-dataTable using basic way the p-dropdown filter for column is working fine but when I bind p-dataTable using [lazy]="true" (onLazyLoad)="loadData($event)" then the dropdown column filter is not working. Working Code: …
3
votes
1 answer

PrimeNG Datatable with row exansion call new service and display data in a row Angular 5

I am trying to add extra array of the object to the PrimeNG expandable row but I am kind of new to PrimeNG so not sure where to proceed for this issue. Desired Behaviour: Basically I would like to call the extra service onclick of the row and want…
Bravo
  • 91
  • 1
  • 13
3
votes
3 answers

Why are table headers not displayed in responsive primeng table?

I have a primeng datatable, it is properly rendered in normal mode. But, when I view in the mobile view, the table headers are not displayed. I have the responsive property of the table set to true. Please see the screenshot. I have the headers…
Nitin Avula
  • 253
  • 1
  • 5
  • 15
1
2
3
26 27