anon
anon

Reputation:

How do I hide columns by default?

I'd like to only show certain columns on load, while still having other columns available in the grid menu to be shown.

For example, my data contains: name, address, phone, email.

I'd like to show name and address on page load, but have phone and email available in the grid menu to show. This is in order to accommodate grids with say 15 columns, but only show 5, and allow the users to pick and choose which other columns to show, if at all. If the users would like to show 7 columns by default, I can save the current shown columns and create a new configuration to load for that particular user.

Upvotes: 4

Views: 4095

Answers (2)

gnganapath
gnganapath

Reputation: 947

{headerName: 'head1', field: 'headkey1', hide: true } hide: true is working instead of visible: false. Now working in Angualar 5.

Upvotes: 0

Ahmed Hashem
Ahmed Hashem

Reputation: 4733

simply add: visible: false to columns you want to hide by default

Upvotes: 8

Related Questions