What I want is below.
On the right-click menu like below image,
when you click RedColor, background color of the cell changes red.
When you click YellowColor, background color of the cell changes yellow .
When you click ResetColor, background color of the cell gets back to default color "white".
I came to implemet like this here but I'm not really confident..
I'm not sure how to make Click Action and how to change cell background color when I select on right-menu.
I'd appreciate it if you could tell me how to implement this.
Do you have any good ideas?
I'd be nice if you could give me a sample oml and how to do it .
Best,
Hi @Tsubasa Yoshikawa
I found out that you were having several issues:
It worked fine so this should be enough to help you (won't be able to share oml).For multiple selections you just need to return the list instead of the first cel information since for demo purposes I simplified the code).
Cheers,GM
Hi GM,
I appreciate it. I got what I wanted.
Thank you.
Also, I'm curious about something but I wonder if we can save cell data we changed color in database as an entity.
For example, let's say you have a save button on top of the screen.
You change background color of some cells and click the save button then you reload the screen.
Change cell color adn click save button
↓ reload
Display colored cells you saved
(You can see the grid with colored cells you changed. )
I'm now thinking about it but do you have any ideas on this?
Just to make this more collaborative, can you please share:
Hi,
What I achieve is to change backgroud color of the cell according to pressing menu on the right-click menu.
RedColor→ change the cell background color to red
YellowColor→ change the cell background color to yellow
ResetColor→ change the cell background color back to original (white)
What I implemeted is
・show right-click menu
What I haven't done yet is
・ when I select menu on right-click menu , how do I trigger Client action.
・How to change cell color on Javascript in ClientAction
This is where I am.
I'm attaching my OML.
I implementing on this screen (CellColorByClickGrid)
Could you possibly give me any good advice?
You can try to follow this approach using the format Cells available on this Wijmo's sample.
Thanks.
I took a look at your link and other similar posts and tried them but it doesn't work..
I'm not sure how to change cell background color when selecting action on right-click menu...
Could you possibly tell me where I'm missing? I was wondering if I could get your advice.
The below is what I did.
I created Client action to change cell color here in CustomOption.
I made this kind of Javascript here.
I made the rest (YellowColor , ResetColor) Cilck action the same way.
I also set CSS.
Tsubasa
I updated my oml.
I'm using AddCssCellClass action.
But I'm not sure how to get current selected column and It still doesn't work...
I'd like you to tell me how I should do it.