I'm applying css to change background-color of a row, but only other styles change except background-color:
Example:
.Style { color: Blue; background-color: Yellow; }
While applying this style using this code WebHierarchicalDataGrid1.Rows[1].CssClass = "Style" so only text in blue and background with no change.
What is the issue?
Hello arseny,
Thank you for posting on our forums!
This is due to the alternate row styling. Our CSS applies the alternate row with the following CSS selector:
tbody > tr.igg_Alt > td { ... background-color: *color*; }
When setting the Style property of a row in code, this gets applied to the "tbody > tr" and the alternating rows overwrites it in the "td". This can be resolved by using the following CSS selector for your Style class:
tbody > tr.Style > td { color: Blue; background-color: Yellow; }
If you need further assistance with this, please let me know and I will be glad to help.