Is it possible to bind all rows Vaadin 8 grid cells to mutiple TextFields?

Hello

I have maybe a stupid question

but I was wondering is it possible to show values from all cells from all rows (not big grid) in Textfields

Let’s say I have a grid with 5 columns and 5 rows

Thats is 25 cells

and I have 25 Text Fields

Is it possible to get all those values from 25 cells in 25 TextFields?

Yes it is kind of possible. But I would really think first what you ultimatelly want to achieve and what is the best UX for that.

In Grid Renderers Collection there is TextField renderer. So you could add that to each of your 5 columns, and voila there is 25 text fields:

https://vaadin.com/directory/component/grid-renderers-collection-for-vaadin7 (despite the name it has version for Vaadin 8 as well)

There are also alternative approaches. The above solution will not use Binder and you can’t use Binder’s Validation mechanism. If you want to use that, I would recommend to use Grid’s un-buffered editor instead, i.e. Grid.getEditor().setBuffered(false); There will not be 25 text fields visible at the same time, but experience will be otherwise pretty much the same.

If you need keyboard navigation with Grid’s un-buffered editor use

https://vaadin.com/directory/component/gridfastnavigation-add-on

I am just mentioning this, since it may be one of the reasons why you are thinking about having all the text fields at the same time.

I appreciate the info, and gonna try that right now and get back to you, thank you.