Sub row styling

I’m trying to add css styling to a sub_row via xml:



print("<cell class=“subrow”><![CDATA[");
print($row['notes']);
print("]]>");



This works if CDATA is not present but does not work in this example.



Is there another way of adding css to a sub_row?

The same code works as expected in local samples - defined css class applied to the cell in question, but it will affect only cell in related column - not the text in sub-row

If you need to affect the text in sub-row - you can add custom rules to the dhx_sub_row css class

.dhx_sub_row{
font-weight:bold;
}

Or use inline styles as
print("<cell class=“subrow”><![CDATA[");
print($row['notes']);
print("]]>");


Adding a sub_row css class worked.



However, the inline style added a ‘+’ sign to every row - including rows that have no sub_row.

It can be resolved by adjusting code of grid or server side code, which generates data.
In case of server side code it will look as
print("<cell class=“subrow”>");
if ($row[‘notes’]) print("<![CDATA[".$row['notes']."]]>");
print("");
In such case , unnecessary tags will not affect empty sub-elements