Vaadin Grid Dynamic Columns with column header and/or footer

Hello People!

The last few hours I have been trying to configure a way to load dynamic columns with the showing if the column header and footer dynamic aswell.

This is how it is currently set up:

<template is="dom-repeat" id="columns" mutable-data items="[[columns] ]" as="column"> <vaadin-grid-column width="[[column.width] ]" frozen$="[[column.frozen] ]" resizable$="[[column.resizable] ]"> <template is="dom-if" if="{{header}}" class="header"> Now the loading of the columns etc is all working fine but the moment I set the dom-if on the column header and footer they don’t get displayed anymore at all.

My question is: Is it a known problem that the column header can’t be set with a dom-if? And if so is there a different approach.

Thanks in advance,

Anton

Hi. You should move the dom-if inside the header template. Then it should work.

<template class="header">
  <template is="dom-if" if="{{header}}">
    First Name
  </template>
</template>

Haha, wouw such an easy sollution, I guess i’ve been looking at it to long

Thanks for your help!