LIstening for resizedColumn events with addEventlistener

Posted by: p.wijmo on 2 May 2018, 2:08 am EST

    • Post Options:
    • Link

    Posted 2 May 2018, 2:08 am EST

    I’m trying to write an Angular directive that allows custom behaviour when a column is resized on a FlexGrid.

    I want to be able to do this without directly binding to the resizedColumn event in the element, but instead through a directive I add to the element, i.e.

    in the implementation of customColumnResizeDirective, I’d like to listen for resizedColumn events via addEventListener:

    constructor(@Host*( private flex: WjFlexGrid) {

    this.flex.addEventListener(this.flex.hostElement, ‘resizedcolumn’, (e: any) => {

    console.log(‘resized!’, e);

    });

    }

    Is this approach possible with the correct event-name string, or is there no way to listen for FlexGrid specific events like this?

  • Posted 2 May 2018, 2:14 am EST

    For some reason I couldn’t add the code tags in Chrome, so…

    
    constructor(@Host() private flex: WjFlexGrid) {
        this.flex.addEventListener(this.flex.hostElement, 'resizedcolumn', (e: any) => {
            console.log('resized!', e);
        });
    }
    
    
  • Posted 2 May 2018, 8:51 pm EST

    Aha, I see in the docs i can subscribe to ```

    resizedColumnNg

  • Posted 2 May 2018, 10:01 pm EST

    Hi,

    Glad to know that you have resolved your issue.

    Please refer to following blog for handling wijmo event:

    https://www.grapecity.com/en/blogs/html-and-wijmo-events/

    ~Manish

Need extra support?

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

Learn More

Forum Channels