Wijmo flexgrid Column picker issue using angular

Posted by: teenu.k on 5 May 2020, 11:49 am EST

    • Post Options:
    • Link

    Posted 5 May 2020, 11:49 am EST

    Hi,

    I want to implement a column-picker UI on wijmo flexgrid using angular.

    my requirement is need to show/hide the popup according to a button outside the flexgrid.

    The following is the click function I used

    in component.ts

    showHideColumn(){

    	let  ref=document.querySelector(".ext-btn");
    	let host = this.columnPicker.hostElement;
    	        if (!host.offsetHeight  ) {
    	            showPopup(host, ref, false, true, false);
    	            this.columnPicker.focus();
    	        } else {
    	            hidePopup(host, true, true);
    	          //  this.flexTable.focus();
    	        }
    
    }
    

    In html

    <button class=“ext-btn” mat-raised-button (click)=“showHideColumn()”>

    Help Show/Hide Columns

    But now when I click this button it always showing the column picker.not hiding on the button click.

    How to do this?

    Regards,

    Teenu

  • Posted 6 May 2020, 1:45 am EST

    Hi Teenu,

    Instead of handling the click event on the button, try using the mousedown event and the picker will toggle when the button will be clicked.

    https://stackblitz.com/edit/angular-t8e6ij

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels