Conditional formatting cell (Color and Background Color) with custom plugin #1342
Replies: 3 comments 10 replies
-
@asananddevsingh - I don't think you will be able to do this with a custom HyperFormula function plugin. HyperFormula is "headless" and doesn't know anything about how a host application (like Handsontable) elects to render/draw a cell or its contents. If you are interested in getting into some internals - I worked on a feature earlier this year that allowed HyperFormula to pass a "hint" to the host application that a cell should be rendered as an HTML Link that you might find useful. The HyperFormula part has been accepted but the Handsontable code is still pending. Issue: #1215 Note You can see a bit of this in your sandbox/sample if you add a |
Beta Was this translation helpful? Give feedback.
-
Is there any particular need to have a custom formula? If the cell color should change based on the value of the 2nd column you can use IF and some cell metadata conditionals. Here's an example https://jsfiddle.net/9wpamzxu/ I set it up to show nothing if the condition is not met. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, conditional formatting should be the responsibility of the UI (hansontable or a custom one), so HyperFormula does not need any changes to make it possible. I believe this discussion is more about handsontable API now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am working on a feature POC where I want to allow the user to insert a column to the handsontable and fill that with data from any existing column with some conditional formatting.
Handontable used with "non-commercial-and-evaluation" license with below versions
I've created a custom plugin for hyperformula called as "FORMAT" whick takes 3 arguments,
e.g. =FORMAT(B1 > 100, "white", "red")
Now, I want to parse this formaula and format the cell based on it. I am unabele to understand how to control the Handsontable from Plugin. Grid example is as below:
Here is Sandbox of the my code:
e.g.

Please suggest, if it is possible to allow user to add column and apply formatting formula to it.
Thanks,
Anand Dev
Beta Was this translation helpful? Give feedback.
All reactions