-
1. Re: DataTable different row colors?
daedlus May 27, 2007 4:33 AM (in response to defrian)did u try rowClasses attribute?
-
2. Re: DataTable different row colors?
ratondeau May 27, 2007 9:03 AM (in response to defrian)yes simple indeed
you have to set the rowClasses of rich:dataTable for example if you want to use grey and white you write something like this:<rich:dataTable rowClasses="greyRow, whiteRow">...
where the Classes have to be defined in a css file e.g..greyRow{ background: #eee; }
Bye Matt -
3. Re: DataTable different row colors?
francof Apr 29, 2008 2:36 PM (in response to defrian)My problem is closely related to this post.
I have a column in my entity class.
@Column(name = "ENABLED", nullable = false, length = 1)
@Type(type = "yes_no")
@NotNull
public Boolean getEnabled() {
return this.enabled;
}
In my richfaces datatable, I would like to display all rows which have enabled='N' to a grey background and enabled='Y' to a white background color. How do I do this?
Setting it to<rich:dataTable id="burstList" var="burst" value="#{burstList.resultList}" rendered="#{not empty burstList.resultList}" rowClasses="#{burst.enabled} ? enabledrow, disabledrow : ''" >
of course does not give me the expected result. -
4. Re: DataTable different row colors?
eicki May 5, 2008 2:42 PM (in response to defrian)Try setting style class on each column tag as you did in the datatable. That should work.
-
5. Re: DataTable different row colors?
supernovasoftware.com May 5, 2008 3:12 PM (in response to defrian)I would prefer that I could set the row css by el directly.
I have to put it on every column. This is not optimal.