How to destroy grid or force to refresh control selection (control select) ,When you apply external filter.

1.How to destroy grid or force to refresh control selection (control select) ,When you apply external filter.

2. I just a example to do destroy grid based on external filter 

3. I just a example to do componentWillUnmount and destroy or refresh grid or destroy


1 Reply

JS Johnson Soundararajan S Syncfusion Team April 2, 2024 11:04 AM UTC

Hi Viji Palanisamy,


We reviewed your query, We noticed that you want to refresh or destroy the grid when applying the external filter. We achieve your requirement by using the refresh() method. The refresh() method is used to refresh the grid header and content.

Please refer to the below API link, sample and code snippet for more information.  


Code sample :

Index.js

 

  const handleFilterChange = (e=> {

    const value = e.target.value;

    gridInstance.filterByColumn('CustomerName''contains'value);     // Filter the column

    setFilterValue(value);

    gridInstance.refresh();     // Refresh the Grid

  };

 


Sample : Pz6rjm (forked) - StackBlitz


API link :
Refresh -
React Grid API component - Syncfusion
Destroy -
React Grid API component - Syncfusion

If this does not meet your requirements, please provide more information regarding your requirement.
 

Regards,

Johnson Soundararajan S


Loader.
Up arrow icon