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. Image for the cookie policy date
close icon

Enable/disable column filter menu by external button

Hi Syncfusion,

Filter menu can be enabled like described here:

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

Thanks,
Marius

3 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team 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. 



ML Marius Lian October 30, 2019 10:34 AM UTC

Perfect! Thx :)


PS Pavithra Subramaniyam Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon