I'm trying to hide/show columns with a custom component.
Sadly i can't get a ColumnStore instance,
neither from grid.columns (returns array of columns, that don't have the hide/show native functions since they are just generic Objects),
nor can i create a working instance with 'new ColumnStore (grid.store)' and even if i get an unchained ColumnStore the instance doesn't have the fields, methods and properties discribed in the docs.
Here is my column-list (set via columns-property in gridConfig):
[
{
text : 'Id',
field : 'secondaryId',
width : 50,
filterable: false,
hideable: true
},
{
text : 'Name',
field : 'name',
flex : 0,
width: 180,
filterable: false,
hideable: true
},
....
]
My Questions are:
Is there a Problem with the way i set up my Columns?
Why doesn't the ColumnStore instance have the correct fields, methods etc?
Is there a Problem with the way i set up my Columns?
Could you please share your application?
Why doesn't the ColumnStore instance have the correct fields, methods etc?
How can i hide/show specific columns with VUE3?
Basically, grid.columns should return ColumnStore instance in case your grid is also instance and not some config. We need to see your full app to know that.
Here is example how to change columns visibility using vue component methods:
@Alex: the instance was an issue aswell as the timing, i try to access the ColumnStore after Rendering the rows where it is not accessable aswell as using the wrong instance to get it, via 'grid.value.instance.value' i was successful at getting the ColmnStore as discribed in the docs