Skip to content

Cell Background colors gets scrambled on sort or search #1295

Answered by ghiscoding
KingsGithub asked this question in Q&A
Discussion options

You must be logged in to vote

SlickGrid doesn't keep the cell content in synch, it only keeps a cell and column index, if you change sort/filter/page then the style will remain on the current cell position because the styling is applied on the cell/column index. You need to include logic yourself to handle all of that whenever a filter/sort/page is triggered, that will require to recalculate and reapply styling accordingly, this kind of logic is demoed in Slickgrid-Universal Example 12 (typically that would be Example 30 in here but I think I forgot to copy back some of the logic that changed when I encountered similar issue in universal).

https://github.com/ghiscoding/slickgrid-universal/blob/43f546cc93e1ebaffdc2dfd9…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ghiscoding
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants