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

Filter from outside the grid

Thread ID:

Created:

Updated:

Platform:

Replies:

128468 Jan 24,2017 09:16 PM UTC Feb 21,2017 03:58 AM UTC Angular 6
loading
Tags: ejGrid
Zack
Asked On January 24, 2017 09:16 PM UTC

Say I had a search bar above the grid that I wanted to use to filter. 
I enabled excel style filtering.
I have the grid object using viewchild.
I'm not sure how to pick a column and manually filter it. I essentially just want it to be as if they typed the query into the excel filter itself

Zack
Replied On January 24, 2017 10:18 PM UTC

Took advantage of this.grid.widget.filterColumn to achieve the desired result from looking at another support post. Thanks!

Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 25, 2017 06:46 AM UTC

Hi Zack, 

Thanks for contacting Syncfusion support. 

We are happy to hear that your issue has been resolved. 

Please let us know if you need any further assistance.  

Regards, 
Prasanna Kumar N.S.V 


Bernd Schuhmacher
Replied On February 16, 2017 02:16 PM UTC

Hi

I think I am stuck with something that sounds like the given problem.

I created a page with some dropdowns (HTML select) and an ejGrid.
My goal is to select an entry from one of the dropdowns and filter the data given in the ejGrid with a given column and the selected value.

I imported core.js (import { EJComponents } from 'ej-angular2/src/ej/core) and created a ViewChild (@ViewChild('KranTabelle') Grid: EJComponents<any, any>;).

After that it seems I can access the grid with
this.Grid.widget

But I do not know what to do after that. Is it possible what I want?
Is there some more documentetion somewhere?

Regards
Bernd


Prasanna Kumar Viswanathan [Syncfusion]
Replied On February 17, 2017 02:08 PM UTC

Hi Bernd, 

      Queries 
                                           Response 

I created a page with some dropdowns (HTML select) and an ejGrid.
My goal is to select an entry from one of the dropdowns and filter the data given in the ejGrid with a given column and the selected value.
” 


We have created a sample with a dropdown and an ejGrid. For the dropdown we bind the change event.  

In change event of dropdown we can get the change value in the arguments and in this we get the grid instance and filter the grid using filterColumn method of ejGrid. 

Find the code example and sample:  

<select id="EmployeeID" name="EmployeeID" (change)="dropdown($event.target.value)"> 
      <option value="1">1</option> 
      <option value="2">2</option> 
      <option value="3">3</option> 
    </select> 
        
     
<ej-grid [allowPaging]="true" id="Grid" [allowSorting]="true" [dataSource]="gridData" [columns]="columns" [allowFiltering]="true"  [toolbarSettings]= "tool"> 
<e-columns> 
        ----------------------------------- 
   </e-columns> 
</ej-grid> 
 
------------------------------------ 

xport class AppComponent { 
    
    public editTemp; 
    dropdown(event) { 
        var obj = $('#Grid').data("ejGrid"); 
        obj.filterColumn("EmployeeID", "equal", parseInt(event), "and", true); 
    } 
    public tool = { showToolbar: true, toolbarItems: ["add", "edit", "delete", "update", "cancel"] } 
    ------------------------------ 
} 


Refer to the Help document for the filterColumn method 



I imported core.js (import { EJComponents } from 'ej-angular2/src/ej/core) and created a ViewChild (@ViewChild('KranTabelle') Grid: EJComponents<any, any>;).” 


Yes, we have a documentation for this and please download the document from the following link 


We have already created a Knowledgebase documentation for this and it will be published sooner.   


Regards, 
Prasanna Kumar N.S.V 
 


Bernd Schuhmacher
Replied On February 20, 2017 07:07 AM UTC

Hi

Thanks for those hints. This helped a lot.

Regards
Bernd

Prasanna Kumar Viswanathan [Syncfusion]
Replied On February 21, 2017 03:58 AM UTC

Hi Bernd, 

We are happy to hear that your issue has been resolved. 

Please let us know if you need any further assistance. 

Regards, 
Prasanna Kumar N.S.V 


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.

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

;