Remove datatable header with key

UI Components for Angular
Post Reply
Mehak
Posts: 10
Joined: 02 May 2016, 01:25

03 May 2016, 15:22

Please guide me how can i remove datatable header with key.

cagatay.civici
Prime
Posts: 18430
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

03 May 2016, 22:43

Please provide more details about your requirement.

Mehak
Posts: 10
Joined: 02 May 2016, 01:25

04 May 2016, 01:12

i want to remove the headers of datatable i know how to do in CSS globally like that

.ui-datatable thead {
display: none
}

It works fine but it remove the headers from all the datatable of my application.
I just wanted to know is there any way to add key in css settings so that would help me to remove the datatable headers where is required.

cagatay.civici
Prime
Posts: 18430
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 May 2016, 17:12

But it will corrupt the visual state, why not hide the content of headers? I guess you can do it with a condition;

Code: Select all

<p-column styleClass="condition ? 'hidden-header': null"

Code: Select all

.hidden-header.th * {
   display:none
}

Mehak
Posts: 10
Joined: 02 May 2016, 01:25

08 May 2016, 17:17

Not working for me.

My scenario is simple i have two components A,B and both have datatable, In component A i want datatable with headers and in component B i don't want headers.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests