Conditional Cell Format using Between, or greater than / less than

QuestionsConditional Cell Format using Between, or greater than / less than
Michael F Sheppard asked 1 year ago

I would like to be able to set cell CSS formatting with a range, not just an EQUAL or LESS THAN variable.

For example,
(< 30) = GREEN
(>30 <  60) = YELLOW
(>60 < 90) = RED

Can this be done inside the grid? Or do I need to code hidden columns to do this?

Thanks

Mike

2 Answers
Abu Ghufran Staff answered 1 year ago

For any custom logic for conditional formatting, you can refer this code. In the callback you can apply if-elseif-else conditions and set formatting based on the column data.

https://www.gridphp.com/demo/demos/appearance/conditional-format-ext.phps

Line 32 and 97.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Michael answered 1 year ago

Thanks Abu – that’s what I needed – this works perfectly!

Your Answer

15 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?