Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 331
ton.yeung Avatar asked Feb 11 '23 17:02

ton.yeung


1 Answers

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

like image 188
Ahmed Hashem Avatar answered Feb 24 '23 17:02

Ahmed Hashem