Vaadin 8 Grid difficulties showing collections (NOT beans)

I am evaluating Vaadin for use in our projects and while all looks promising I have hit an issue with the Grid component that I am struggling to resolve.

We need to display collections in tables, where columns are known only at runtime. I was not able find any way how to do it in Vaadin 8 as I could find how to bind beans only ( in Vaadin 7 I can see that being possible with addRow() which is not available in 8).

I managed to find a couple of posts related to this topic but both are left ununswered.
Can somone point me to an example how to do it, e.g. if a Product is represented as a set of properties like Map<String,String> (not as a bean), i.e. something that would be retuned by SELECT * from PRODUCT_XXX table.

Any help/comment will be greatly appreciated.

You can generate a List<Map> using an SQL query called from inside a DataProvider.fromCallbacks() method and use the result to back a Vaadin 8 Grid. The exact construction of the query can be determined at runtime, and the map will reflect whatever column structure the query returns. Maps did the trick for me, described briefly here: https://vaadin.com/forum#!/thread/15437644

Hi Stave, thank you for the reply.
It helped me to look at the issue differently and then I managed to find a related example here

https://vaadin8cookbook.blogspot.com/2017/04/grid-with-dates-as-columns.html

I have applied that to my case and have a working code.

       // RecordSetReaderCSV reader
        // class Record extends HashMap<Object,Object>

        Grid<Record> table = new Grid<>();
        // read header/column names
        Record record = reader.getNextRecord();
        List<String> header = record.getKeysAsStrings();
        // create columns
        for (String colName : header) {
            Grid.Column<Record, Object> column = table
                    .addColumn((ValueProvider<Record, Object>) rec -> rec.get(colName));
            column.setCaption(colName);
        }
        // read rows
        List<Record> rows = new ArrayList<>();
        while ((record = reader.getNextRecord()) != null)
            rows.add(record);
        // set row values to table
        table.setItems(rows);

Hope this can help someone else.