Megna Musapeta

Megna Musapeta

  • NA
  • 49
  • 27.6k

Background Color in MVC

Jun 17 2017 3:06 AM

ICreated a Webgrid on MVC, I have around 22 Columns returned by the Webgrid, I am trying to generate Background color Red, Green, Yellow depending on the Condition.

1 --> Green

0 --> Red
-1 --> Yellow 
 
I have a Query but it is not working as  expected, I need to put each column number that way I need to create 22 conditions but i need something simple which says if its 1 then Green, 0 Red and -1 Yellow.
 
 Please help, as i couldnt find the answer anywhere, I am trying for this for a while. 


 

Answers (8)