0

I used primeng p-table for multiple selection grid. I have requirement to select multiple row by clicking on each row checkbox. I have to hide/remove checkbox from ptable header.

Can I get solution for this. I have tried changing css styles but couldn't able to hide checkbox in header of ptable. thanks in advance.

Shridhara M N
  • 23
  • 1
  • 7

2 Answers2

0

For adding and removing elements, Angular has the *ngIf="" directive.

Edit: When scrolling through the documentation (here), i read that the column has a hidden property. Use that.

hidden  boolean false   Controls visiblity of the column.
Carsten
  • 4,005
  • 21
  • 28
  • Thanks for the response. I tried having *ngIf for tag, i think primeng won't support that feature. I need checkbox in each row but not in p-table header. – Shridhara M N Aug 29 '17 at 05:37
0

The best way to remove "Checkbox" from header is through styles.

Check the dom tree for style hierarchy and as per your code modify below code to suits your hierarchy. Typical hierarchy as below.

th.p-selection-column .p-checkbox {
    display: none;
}
Josef
  • 2,869
  • 2
  • 22
  • 23