JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › DropDownList › Coloring list items › Reply To: Coloring list items
October 25, 2022 at 6:27 am
#103914
svetoslav_borislavov
Participant
Hi,
You can do the following:
- Set a dataSource with the items and in the object, you can add a property for the class
- ForEach the dataSource and for each item, you can get the relevant element and apply the element’s class
Please look at the demo here: https://codepen.io/svetoslavb04/pen/OJEJXbe
Hope this helps!
Best Regards,
Svetoslav Borislavov
Smart UI Team
https://www.htmlelements.com/