Vaadin 14 grid, Disable selection on certain row

Hi,

just a question, is it possible to disable the selection on a certain row of a grid ?

What i need is to set some row as selected and forbid the user to deselect, instead the user can select or deselect other rows.

Thanks

Giovanni Adobati:
Hi,

just a question, is it possible to disable the selection on a certain row of a grid ?

What i need is to set some row as selected and forbid the user to deselect, instead the user can select or deselect other rows.

Thanks

Hi,

solved in this way, there could be a cleaner way

Thanks

gridSubProduct.addSelectionListener(event -> {

	mandatoryproduct.forEach(gridSubProduct::select);

});

Thank you, that’s a good workaround. The feature request has been entered into the Vaadin bug tracker, here: https://github.com/vaadin/vaadin-grid/issues/1180