-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to override getItemMetadata for non-group rows in DataView #262
Comments
PS. The sad thing with |
Perhaps this lack of row level DataView metadata needs addressing. There have been complaints about how often metadata is fetched, too. I'll be too busy for even minor re-architecting until september. Happy to accept sensible PRs in the meantime. |
I seem to recall that I added a way to define row css in my personal repo, then added it across to the main repo. I usually document these things by adding an example, rather than by adding to the wiki (bad, I know!). |
The example linked above seems to demonstrate adding CSS to cells, but not to whole rows. There are various recipes on stackoverflow for adding CSS to whole rows, as long as you are using DataView. These involve overriding the getItemMetadata method. e.g. https://stackoverflow.com/questions/8930167/how-do-i-add-a-css-class-to-particular-rows-in-slickgrid
Since I upgraded from v2 to v5, I found I need to provide
Then it works again. I'm unsure whether |
You need to provide |
DataView always returns null for non-group rows in
getItemMetadata
:SlickGrid/slick.dataview.js
Lines 455 to 471 in 14bb1a8
Use case: "add css class to the grid row when item has certain property".
metadata.cssClasses
seems to be the way to add row css classes, however DataView does not allow to use that:SlickGrid/slick.grid.js
Lines 1680 to 1686 in 14bb1a8
The text was updated successfully, but these errors were encountered: