Using Grid with inline data

    After creating a Grid instance, the first thing you need to do is to define the columns that should be shown. You an also define the types of the data in each column - Grid will expect String data in each column unless you do this.

    Java

    When you have added all columns, you can add data using the addRow(Object…​) method.

    Java

    Grid will still manage a instance for you behind the scenes, so you can still use Grid API that is based on Property or Item from the API. One particularly useful feature is that each added row will get an Integer item id, counting up starting from 1. This means that you can e.g. select the second row in this way:

    Java

    Full example

    Java