Is there any way to make row change background by clicking on button? I have the following code:
rowClassRules: {
"a-grade": params => params.api.getValue("Grade", params.node) == 'A',
"b-grade": params => params.api.getValue("Grade", params.node) == 'B',
"c-grade": params => params.api.getValue("Grade", params.node) == 'C',
},
It changes row color based on value in the column Grade. But I want to do the same only after pressing a button, and also other button should turn it off (like Turn On/Off highlighting). I have no idea how to turn this code into a function which I can use in the button's onclick.