We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Enable/disable column filter menu by external button

Thread ID:

Created:

Updated:

Platform:

Replies:

148617 Oct 28,2019 07:46 AM UTC Oct 31,2019 09:20 AM UTC Vue 3
loading
Tags: Data Grid
Marius Lian
Asked On October 28, 2019 07:46 AM UTC

Hi Syncfusion,

Filter menu can be enabled like described here:

But how can I enable/disable filter menu by external button? 

Thanks,
Marius

Thavasianand Sankaranarayanan [Syncfusion]
Replied On October 30, 2019 10:12 AM UTC

Hi Marius, 
 
Thanks for contacting Syncfusion support. 
 
We suggest you to use the below solution to resolve this issue. Here we use the allowfiltering option to be changed( i.e., true or false) , to fulfill our requirement. Please check the code snippet for your reference. A sample is also attached below, make a note on that. 
 
App.vue 
 
<div id="app"> 
    <ejs-button id="enable" cssClass="e-flat" @click.native="enable">Enable Filter</ejs-button> 
    <ejs-button id="disable" cssClass="e-flat" @click.native="disable">Disable Filter</ejs-button> 
 
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons"; 
 
  methods: { 
    enable: function() { 
      this.$refs.grid.ej2Instances.allowFiltering = true; 
    }, 
    disable: function() { 
      this.$refs.grid.ej2Instances.allowFiltering = false; 
    } 
  }, 
 


Please get back to us if you need further assistance 

Regards, 
Thavasianand S. 


Marius Lian
Replied On October 30, 2019 10:34 AM UTC

Perfect! Thx :)

Pavithra Subramaniyam [Syncfusion]
Replied On October 31, 2019 09:20 AM UTC

Hi Marius,  

Thanks for your update. 

Please contact us if you need any further assistance. As always, we will be happy to assist you.  

Regards,  
Pavithra S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon