I'm using a hierarchical grid and would like to unset the alternating row color and use my own based upon the values in a particular column. I can get the background color set correctly on half of the rows, but the alternating rows obliterates my custom color. I've tried using:
.ui-ig-altrecord .ui-iggrid-altrecord .ui-ig-record .ui-iggrid-record { background-color: unset; }
But that has no effect.
Any helpful suggestions would be most welcome.
Hello Kenneth,
Thank you for posting in our community!What I can suggest in order to reference the alternating rows by their class is as following:
.ui-iggrid-table tr.ui-ig-altrecord { background: unset; }
Additionally, I have attached a small sample using my suggestion for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve please free to modify it and send it back to me for further investigation.
Please let me know if you need any further assistance with this matter.
0003.igGridChangeAltRowsStyle.zip
Hi Vasya,
Thanks for getting back to me. That didn't work. Is there anything different in the CSS classes because it's a hierarchical grid? That didn't seem to have any effect.
I am glad that you managed to achieve your requirement.
Thank you for choosing Infragistics components!
Hello Vasya,
Thank you for getting back to me. I fixed the problem by changing the alternateRow property on the grid to false.
By design igHierarchicalGrid consists of multiple igGrid components, one for each level, which means that same classes are applied to the hierarchical grid as well.
I modified my sample so that it has one igGrid component and one igHierarchicalGrid copmonent. I did not modified the css classes and they are successfully applied to both of them.
Please test my sample on your side and let me know how it behaves. If you are experiencing a different behavior on your side please feel free to modfiy it and send it back to me further investigation.
Looking forward to hearing from you.
4118.igGridChangeHoverStyleModified.zip