Cells Styling

Tags: #<Tag:0x00007efc6562d708> #<Tag:0x00007efc6562d5a0>

I would like to know or what you recommend from experience.

if I have a table that fetch data only from database and lets say I am able to allow users to change cells: color, font, and cell background.

Where is the best place to store these attributes in? since users can edit the color or font again if they like from using a basic toolbar.

Do I store these attributes back on my database?
Do I create values file on Frontend and save them there?
I am not really sure, where i really keep them and also follow up question,

How would read these attributes?

Do I read that att file while looping into each cell:

  cells: function (row, col) {
    const cellProperties = {};

Is not that heavy work when the file gets bigger?
Even if I was able to store att for cell col 5 row 5 and let’s say a week later row 1 gets removed, how would I find my edited col 5 row 5 cell again since I lost its position

Last question, I would love to see an example from your past experience that shows me a good way of retrieving these values and applying them to cells?

Sorry for too many questions but I would really appreciate any tips

Hi @noajm

I think in this case the best would be to get the selected cell index with getSelectedLast()method, and then use setCellMeta() to apply new class for styling. You can check how it’s done in this example: https://jsfiddle.net/handsoncode/ps4d0n9z/