• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

styles for column header in dataTable

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, just wanted to ask how to set styles for headers in h ataTable.

i understand that there's columnClasses, which we can set for each columns, rowClasses and headerClass. i tried to put multiple styles in headerClass but it doesn't works.

how am i going to set the style for each column header (different styles per column header)..

kindly advise.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have done something like this it works fine for me.


<h ataTable value="#{fcManagement.loggedInDevices1}" var="loggedInDevice1" bgcolor="#D8E0EF" width="100%" headerClass="dataTableHeader"
rowClasses="dataTableRowWhite, dataTableRowAdbeda"
columnClasses="width:8%;, width:20%;, width:20%;, width:50%;" rendered="#{!empty fcManagement.loggedInDevices1}">

Here I have tried to assign different widths to each column.
Hope this helps.
 
Jolie Lee
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
erm, that will apply to all the columns rite? my problem is to set different styles to the column HEADER....
 
Priti Shah
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think as I have applied different style in columClasses you can do so for headerClass attribute
 
Jolie Lee
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
headerClass only accept one class instead of multiple rite?

cos i tried putting different styles in headerClass, just like wat i did for columnClasses but it did not work ...it only applied the header based on the first class.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic