title: Accessing Vaadin 8 Grid cell value
body: <p>I'm migrating from Vaadin 7 Table to Vaadin 8 Grid. In the Vaadin 7 Table we used IndexedContainer or Container with Property and could access the table cell value with <code>IndexedContainer.getItem(propertyId).getItemProperty(itemId).getValue();</code> or <code>Container.getContainerProperty(itemId, propertyId).getValue()</code>.</p>
  <p>The content of a Vaadin 8 Grid is set via <code>Grid.setItems(Collection&lt;T&gt;)</code>. I found how to access the columns - <code>Grid.getColumns()</code> - and the data provider - <code>Grid.getDataProvider()</code>. But I did not find a way to combine them and get the value of a specific cell...</p>
  <p>Is there a way to access a cell value in a similar way when using a Vaadin 8 Grid?</p>
  <h3>Update:</h3>
  <p>I currently try to figure out the way in accessing data through Grid methods. Currently I have the Vaadin 7 Table code where we access the cell values in a generic way to export the data to e.g. Excel, CSV or PDF:</p>
  <pre><code>
      Table table = ...; /* Is passed in while initializing and is used as kind of black box in the exporter */ 
  
      // Compiling cell values
      Object[] visibleColumns = table.getVisibleColumns();
      Container container = table.getContainerDataSource();
      for (Object itemId : container.getItemIds())
      {
          for (Object propertyId : visibleColumns)
          {
              Property property = container.getContainerProperty(itemId, propertyId);
              Object value = property == null ? null : property.getValue();
              buildCell(value);
          }
      }
  </code></pre>
  <p>In Vaadin 8 I have the Grid and I tried to adapt:</p>
  <pre><code>
      Grid grid = ...; // Passed in while initializing
  
      // Compiling cell values
      List visibleColumns = new ArrayList();
      List columns = table.getColumns();
      for(Iterator iterator = columns.iterator(); iterator.hasNext();)
      {
          Column column = iterator.next();
          if (!column.isHidden())
          {
              visibleColumns.add(column);
          }
      }
  
      // The Grid gets a Collection set as items, so I assume the rows should be ListDataProvider
      ListDataProvider listContainer = (ListDataProvider)grid.getDataProvider();
      Collection items = listContainer.getItems();
      for (/* Now I should be able to get the stored values in each row, but I assume I need the data types ... */)
      {
          for (Column column : visibleColumns)
          {
              String propertyId = column.getId(); // Could be null if no ID is given
              /* At least here I'd like to have access to the cell value */
          }
      }
  </code></pre>