动态添加 <th> 到 Vaadin 网格

Adding <th>'s to Vaadin Grid Dynamically

动态添加列时,如何在网格 header.

中设置 <th>
 <vaadin-grid id="grid">
         <table>
          <colgroup>
          </colgroup>
          <thead>
            <tr>
              <th>adfdfa</th>
              <th>adfdfa</th>
            </tr>
          </thead>
        </table>
      </vaadin-grid>


  _addCols: function() {
    var inputs = this.selectedForm.inputs;
    var grid = this.$.grid;
    grid.columns = [];
    for(var i = 0; i < inputs.length; i++) {
      var input = inputs[i];
      grid.addColumn({name: input.$key}, i); 
    }
  },

无论在文档中找到这个。

 grid.header.getCell(0, 0).content = 'Project Name';

Documentation