How to Hidding Column in a DataTable

UI Components for Vue
Post Reply
Dicipulofer
Posts: 8
Joined: 10 Mar 2021, 21:50

14 Apr 2021, 14:58

Hello,

I'm trying to hide a column in a datatable without success. My columns are generated programmatically like this:

<Column v-for="col of columnsMeus" :dataType="col.datatype" :field="col.field" :header="col.header" :key="col.field">

I need to create a hidden column (visible false), because I'll use it to style a row (rowClass).

Putting this code inside to column tag works :style="{visibility: col.visible ? 'visible' : 'hidden'}" but, the grid is showed with width wrong. (look the picture).

Is there some way to hide a column in a datatable ?

http://www.automatizanfe.com.br/download/dtbroken.png

tugce.kucukoglu
Posts: 121
Joined: 23 Oct 2020, 09:28

11 Jun 2021, 15:26

Hi,

You can just use

Code: Select all

<Column v-if=".." ...>...</Column>
Best,

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests