Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Default filtering with ng-template

Default filtering with ng-template

New Discussion
User42
User42 asked on Feb 25, 2019 4:32 PM

Hello,

I have filtering working just fine using ng-template and manually activate filtering via the gui. To do so I’m using a custom filter and specifying it in the [filters] property of the column I want to filter.

Here is how they are defined:

 
            
      
        {{cell.value?.statusName}}
      
    

Like I said, that part works fine.  I’d like to apply a default filter when the page loads up and I’m struggling on how to do that. Your documentation gives this example:

this.grid.filter('ProductName', 'myproduct', IgxStringFilteringOperand.instance().condition("contains"), true);

That works with no issues for me on a normal, non-templated field. How do I apply this on a ng-template field?

I’ve tried supplying the name of the field and field.PropertyName but I’m having no luck.

Thanks!

Sign In to post a reply

Replies

  • 0
    Desislava Dincheva
    Desislava Dincheva answered on Feb 20, 2019 2:59 PM

    Hello,
    Thank you for contacting Infragistics Support!
    We are currently looking into this matter and will keep you posted as soon as I am ready with the sample.

  • 0
    Desislava Dincheva
    Desislava Dincheva answered on Feb 21, 2019 7:14 AM

    Hello, 

    I manage to build a sample, where the described behavior is implemented. Here you can see it.

    As you already have read in our documentation the way of setting filtering is by using the filter method that the igx-grid provides. But when you have a custom filters, you should not use the default filtering operands but instead to pass your custom operands. Also make sure that your class defines the function contains.

    Take a look at the sample and if you need any additional information or further assistance, please contact us.

    • 0
      User42
      User42 answered on Feb 25, 2019 4:32 PM

      Excellent work! Thanks for the sample.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
User42
Favorites
0
Replies
3
Created On
Feb 25, 2019
Last Post
7 years ago

Suggested Discussions

Created by

Created on

Feb 25, 2019 4:32 PM

Last activity on

Feb 23, 2026 4:15 PM