Assigning CSS Style to Slickgrid Cells

前端 未结 1 792
忘了有多久
忘了有多久 2021-01-22 09:00

Slickgrid is continuosly evolving so some of the answers to similar issues are not applicable (e.g., they mention it was not possible to assign a CSS to a specific cell). Appare

相关标签:
1条回答
  • 2021-01-22 09:12

    This can be done with by implementing getItemMetadata(row) (see https://github.com/mleibman/SlickGrid/wiki/Providing-data-to-the-grid), but you'd have to iterate over all cells, so that's not very efficient. Perhaps a custom formatter that looks at the actual value is a better fit. With that, you won't be able to specify a CSS class for the cell itself, but you'd be able to style the cell content however you like, so technically you could make a DIV that fills the whole cell and set background on that.

    0 讨论(0)
提交回复
热议问题