I am facing a simple challenge at the moment. My goal is to dynamically change the background color of my rows, with the intention of incorporating this feature when expanding or contracting groups.
Currently, I am attempting to utilize gridOptions.getRowClass()
, but it seems unable to locate my CSS. Interestingly, setting a background property using getRowStyle()
functions properly. However, I require getRowClass()
for future group-related functionalities.
The following code snippet works successfully:
this.gridOptions.getRowStyle() = function(params) { return { background-color: 'red' } }
On the other hand, this code does not work as expected:
this.gridOptions.getRowClass() = function(params) { return 'my-css-class' }
Utilizing CSS:
.my-css-class {
background-color: red !important;
}
The CSS resides within my <style>
section and the functions are located in beforeMount()
.