How to change color of selected row in datagrid2.0??
0
I want to highlight the selected row in datagrid 2.0. How can I do that??
asked
Syed Aquib
2 answers
1
One way is this:
Add a Boolean attribute to the entity that is used as a data source.
Create a nanoflow or microflow and trigger it with the on-click event of the datagrid 2. This nanoflow or microflow should change the boolean to true or false.
Create a class that styles the row. See the image below for an example.
Use a dynamic row class that sets the class of the row based on the Boolean attribute. See the image below for an example. It sets the class ‘change-row-color’ when selected = true