• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change default header color of a p:dataTable ?

 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a p:dataTable, I want to change the default color just of a header, is it possible ?






Here my entire code:




Thanks in advance !
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rich:dataTable has a headerClass attribute, but I don't believe PrimeFaces has anything equivalent. You could define a style for the <th> row of this table:

 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just changed .ui-datatable-header if you wish to change all dataTables. For specific tables, you can use a styleClass attribute for the specific dataTable.

I finished using:

.ui-datatable-header{ background: blue;}

Thanks for your answer !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic