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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Filter Event Handler

Thread ID:

Created:

Updated:

Platform:

Replies:

142977 Feb 27,2019 11:49 AM UTC Feb 27,2019 12:03 PM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
Rikard Schouwstra
Asked On February 27, 2019 11:49 AM UTC

Hi,

I am looking for a way to trigger a function when filtering is applied on a grid so that I can change the dataSource of a chart? Is this possible and how would I achieve this.

Regards

Pavithra Subramaniyam [Syncfusion]
Replied On February 27, 2019 12:03 PM UTC

Hi Rikard, 
 
Thanks for contacting syncfusion support. 
 
You can achieve your requirement by using the “actionComplete” event of Grid component with requestType as ‘filtering’. Please refer to the below code example and documentation link for more information. 
 
[index.cshtml] 
  <ejs-grid id="Grid" dataSource="ViewBag.datasource"  allowFiltering="true" actionComplete="actionComplete" " allowPaging="true"> 
            <e-grid-pagesettings pageCount="2"></e-grid-pagesettings> 
            <e-grid-columns> 
                <e-grid-column field="OrderID" headerText="Order ID" textAlign="Right" width="120"></e-grid-column> 
                .   .   . 
            </e-grid-columns> 
        </ejs-grid> 
 
<script> 
          function actionComplete(args) { 
              if (args.requestType === 'filtering') { 
                // you can do your requirement here 
            } 
        } 
</script> 
 
 
                              https://ej2.syncfusion.com/javascript/documentation/api/grid/filterEventArgs/  
 
Please contact us if you need any further assistance on this. 
 
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

;