setCellStyleGenerator Error

Hi, I’m trying to personalize some cells in the grid and i am using the setCellStyleGenerator method but it gives me an error so vague, i do not understand where the issue might be. I think it might be an import needed, but i can’t find anything on this. Some help would be much appreciated.

There’s no such method. You probably want Grid | Components | Vaadin Docs

As @vital-koala suggested, if you want to customize the style of whole rows, you’d want grid.setClassNameGenerator or grid.setPartNameGenerator If you want to customize the cells individually, you probably want column.setClassNameGenerator or column.setPartNameGenerator

thank’s for your help

I’m kind of interested in where you got that method name from?

V8 had this :grimacing: (or 7)

Yep, just wondering if there’s an old tutorial or something that shouldn’t be used anymore

The old form is probably the biggest problem because of Google

If there’s e.g. a Stack Overflow answer, those can be edited to add pointers to how things behave in different versions

He might have gotten that function also from chatgpt, codewhisperer, github copilot etc. They also often generate with the v7 / v8 API if the version is unclear

true. I was also a victim of this. Had to correct later on when it shows them as error

sorry for the delayed response. i got it from a lowkey copy of stackoverflow which i don t seem to find anymore. basically it was on google s second page where nobody goes =))