how to put disable rows in grid vaadin 8 ?

I have a grid with SelectionMode.MULTI but I want some rows to be disabled and others not.

This is not supported in Grid directly at the moment, but there are some workarounds, that may work in some cases.

There is also GitHub issue about this

See, comment there, quoting:

“Hm… how about grid.addOpenListener((e) → if (isBadBean(e.getBean())) { grid.getEditor().cancel(); }}? I’ve used this workaround for a long long time now (extended Grid to have open/close events back in 7 when it didn’t have them).”

If you use Grid un-buffered editor, GridFastNavigation provides you some workaround as well.