Add custom color to w2ui cell
See original GitHub issueWell, to add color to a cell in grid is very straight forward with the given documentation.
If the records are hard coded then we can add the colors like this
records: [
{ recid: 1, fname: 'Jane', lname: 'Doe', email: 'jdoe@gmail.com', sdate: 384052483664, style: {3:'background-color: yellow; color: white;'}}
]
But when am loading data from server, I need to add style there only( In my case php). I am trying a lot for correct way to add styles to cells and row, from server, but am not getting the desired result.
Could anyone tell me how to color a cell based on my rule(which is defined in the backend)?
Question on stackoverflow : SO Question
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
Add custom color to w2ui cell [Grid] - javascript - Stack Overflow
I am trying to add color to the cell of w2ui grid. After following the documentation, I am able to change the color...
Read more >Grid Basic: Row Styling | w2ui
Joseph Haydn 1732‑1809
Ludwig Van Beethoven 1770‑1827
Wolfgang Amadeus Mozart 1756‑1791
Johann Sebastian Bach 1685‑1750
Read more >w2grid.columns | JavaScript UI - w2ui
Each column is an object with properties listed below: ... date; time; datetime; color ... I want to add Custom control to the...
Read more >Grid Basic: Cell Renderers | w2ui
You can define a render function for the column by providing a function (see first column) or you can use predefined renderers (int,...
Read more >w2form.fields | JavaScript UI - w2ui
I cannot use "list" type of input, because this form is an edit form of a grid which has inline editing (not on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks chalchis. This is working.
Another question, can I change the color of the row as well as the cell?
1st row=> All green color , but 3rd column of the 1st row => red.
Is it possible?
Hi, i’m currently having the same problem but i can’t find any acceptable result, could you please submit your code ? Thanks!