Upvote 1

Change DataList Cell Style Depeing On Value

Answered Tony Murday 5 years ago

I have a `datalist` which is working perfect the issue i am having is that i want to style a cell in a specific column depending on the value displayed when the table is displayed but i cant find how to do this.

Completed = green background

In Progress = Amber background

Cancelled = Red background

I have tried:



and also using the contains but never works on page load.

If i do it `onclick` i can get it working proving i am not looking for specific value in the list.

How can i do this

Replies (2)

Found the correct fix


I was selecting the DataList column and not the table column.


Glad you figured it out!

Leave a Comment
Attach a file