Conditional styling of accordian cell headers

Hi,

Is there a way to do conditional styling of accordian cellheaders. We don’t want to change the styles on some event, we just want to style the accordian cell header with a different color when we are initilizing the cells, based on some condition.

I see that there is style (dhx_acc_item_label ) that gets applied which has a that has a background_image used to display the color on the accordian cell header. I think i can define a seperate style which i can use.

I think I am on the right direction. Can you suggest how to get this done. Or maybe there is built in support already for this.

Thanks,
Nadeem

Hi,

if the accordion skin is “dhx_web” (skin where backgrund image isn’t used), you may use the following approach to set cell color:

dhxAccord.addItem(“a1”, “new item”);
dhxAccord.cells(“a1”).firstChild.style.backgroundColor = “red”