Author Topic: Issue with PqSelect Hide/Show columns from toolbar  (Read 1842 times)

EPM Solutions

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 182
    • View Profile
Issue with PqSelect Hide/Show columns from toolbar
« on: August 18, 2017, 01:18:22 pm »


Hi am following the below link to implement hide/show columns from toolbar
https://paramquery.com/pro/demos/showhide_columns


 var $sel = $(".columnSelector"),
                    opts = [];
                this.getColModel().forEach(function (column) {
                    if (column.hidden !== true) {
                        opts.push(column.dataIndx);
                    }
                })
                //initialize the selected options corresponding to visible columns in toolbar select list.
                $sel.val(opts);

Till the here everything is working fine from the next line I am getting error Uncaught TypeError: $sel.pqSelect is not a function
           
                //convert it into pqSelect.
                $sel.pqSelect({
                    checkbox: true,
                    multiplePlaceholder: 'Select visible columns',
                    maxDisplay: 100,
                    width: 'auto'
                });

Please suggest where I am doing wrong?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Issue with PqSelect Hide/Show columns from toolbar
« Reply #1 on: August 18, 2017, 06:55:31 pm »
You need to include pqSelect plugin (pqselect.min.js & css file) in the document.