Author Topic: Selecting columns to hide/unhide  (Read 2457 times)

TeeJT

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Selecting columns to hide/unhide
« on: July 28, 2016, 08:34:43 am »
Referring to demo in http://paramquery.com/pro/demos/showhide_columns
Pro 3.30 -> Show / Hide columns

If I have about 50 columns for the user to choose from - the top checkboxes will take a lot of space. Can this be in a dialog for the choice or I have to write my own jQuery dialog to do the choice Also there is no reset columns - if the user has hidden columns and wants to unhide - the user has to reload the page to show all the columns. So I am thinking of a jQuery dialog to do this.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6255
    • View Profile
Re: Selecting columns to hide/unhide
« Reply #1 on: July 29, 2016, 06:15:45 pm »
pqSelect component is used in this example and max number of options/ columns displayed can be controlled with maxDisplay property.

Code: [Select]
//convert it into pqSelect.
                $(".columnSelector").pqSelect({
                    checkbox: true,
                    multiplePlaceholder: 'Select visible columns',
                    maxDisplay: 10,
                    width: 'auto'
                });

Quote
Also there is no reset columns

There is select All checkbox in pqSelect that can be used to show / hide all columns at once.