Questions tagged [primeng-datatable]

Questions about the PrimeNG DataTable component from PrimeTek Informatics.

Useful Links

474 questions
1
vote
1 answer

How to set the default sort order of primeng table depending on observable value

I have p-table with sortable columns. However, initially I want the table to be sorted by a specific column, I use sortFiled for that. But this column is not known till run-time. Here is a snippet of the table:
Lossan
  • 411
  • 1
  • 8
  • 16
1
vote
0 answers

Filtering p-dataView with p-dropdown NgPrime

I am struggling with filtering a dataView with a dropdown menu using NgPrime. It's specifically the dropdown that's giving me a hard time. In fact, I have a working pInputText that filters the dataView for the same thing which tells me it's my…
1
vote
1 answer

PrimeNG table column filter customize - add button and select all checkbox

i am new to PrimeNG library, i want to customize the primeng table column drowndown for filter i got this mock up from design team, i want to add apply button to filter the records based on the checked checkboxes and also select all checkbox.. i go…
1
vote
0 answers

GlobalFilter items from PrimeNG datatable change rowIndex too

Overflow Community, I want some help on Angular PrimeNG data-table. Currently what is happening is row-index is assigned against each row and works fine but when I apply search filter on row-index got updated again from 0. What I want is to attain…
1
vote
1 answer

primeng editable table, issue pEditableColumn

stackblitz The output name does not contain a space(" ") even though I put a space before it.
Liem
  • 446
  • 1
  • 6
  • 20
1
vote
2 answers

How to validate formarray in angular?

I'm using editable with formarray. My model: class Book { id: number; name: string; active: boolean; } allBooks: [ {id: 1, name: 'book1', active: true}, {id: 2, name: 'book2', active: true}, {id: 3, name: 'book3', active: true}, ] code…
1
vote
1 answer

Cannot read property get of undefined

I am getting this error in every edit form of my application also i am getting an error "formGroup expects a FormGroup instance. Please pass one in." But I think I have done everything properly. Please review... edit-account.component.ts :- …
Mayur Saner
  • 444
  • 5
  • 10
1
vote
1 answer

How to paginate PrimeNG DataView dynamically?

I want to go to some specific page when I have selected the Item in that field. I have tried the following way import {DataViewModule, DataView} from 'primeng/dataview'; // ... @ViewChild('dataview') dataTable: DataView; // ... if…
1
vote
1 answer

Primeng Datatable 4.3: array changes not populated

I'm using primeng 4.3 I've coded this primeng datatable:
Jordi
  • 20,868
  • 39
  • 149
  • 333
1
vote
1 answer

Preselecting item in primeng data table

I have a function called "extract" in component "ExtractComponent" which posts some data. When i click on the button "extract" im sending the user to another route to "ExtractedComponent", this component uses a shared component template with some…
Dusan
  • 53
  • 1
  • 9
1
vote
1 answer

PrimeNG table validation

I've following PrimeNG Table Here is the StackBlitz demo. https://stackblitz.com/edit/datatablevalidation Only one column "Value" is editable. In "Value" column, I want to add some validation based on the column "Type". I am rendering column value…
Happy Coder
  • 1,293
  • 1
  • 19
  • 35
1
vote
0 answers

How to find page number by row in primeng datatable

I am using primeng datatable in multiple tabs, so for example, I have three tabs and each has a data table, all columns in my table have a search filter. User filters the table to get some column there are about 3000 columns in the table, an then…
Happy Coder
  • 1,293
  • 1
  • 19
  • 35
1
vote
2 answers

onRowSelect / onRowClick not getting triggered at all. - Primeng table - Angular

I actually require to traverse to another component with the data selected on click of row. I have been using p-table to perform the same. I have totally no idea why. onRowClick / onRowSelection doesn't get triggered at all.I even added a…
Gayathri
  • 1,776
  • 5
  • 23
  • 50
1
vote
1 answer

How to sort a particular column of prime-ng datatable using custom sorting algorithm

I am working on an older project which uses prime-ng's p-datatable. The table currently has default sorting on one column. Now I need to implement sorting on another column but that has to be a custom-logic based sorting. I tried searching for the…
Saurabh Tiwari
  • 4,632
  • 9
  • 42
  • 82
1
vote
1 answer

Sorting p-dataTable not working when p-column uses ng-template

I'm trying to sort a column that has template. My understing is that when a column uses a template, the sorting should be done by responding to the sorting event.
Richard77
  • 20,343
  • 46
  • 150
  • 252