Serenity: How to remove/hide quickfilter dynamically?

Created on 11 Apr 2018  路  6Comments  路  Source: serenity-is/Serenity

For example, on my row:

```C#
[QuickFilter]
public string MyField { get; set; }

So, on my Grid.ts:

```typescript
protected getQuickFilters() : Serenity.QuickFilter<Serenity.Widget<any>, any>[] {
            let filters = super.getQuickFilters();
            let filter = Q.tryFirst(filters, (x) => x.field == fld.Id);
            filter.remove(); // I wanna this!! for example, to using with condition 
}

Most helpful comment

I resolve it with you help:
When set some variable/propertie/member:

let filters = super.getQuickFilters();
filters.splice(1,1);

If it don't wotk, try with:

this.quickFiltersDiv.children().eq(index).remove();

All 6 comments

@brunobola I wanna remove quickfilter control dynamically, not a simple control.

@olaferlandsen dude just point some start point, please search the issues....

@brunobola is for GRID not for Dialog

@olaferlandsen I notice that and was just point you to how to override things, nevertheless, with just a little search and find this topics related....won't be big problem for you to achieve your goal I think.....

https://github.com/volkanceylan/Serenity/issues/2961
https://github.com/volkanceylan/Serenity/issues/342
https://github.com/volkanceylan/Serenity/issues/447

I resolve it with you help:
When set some variable/propertie/member:

let filters = super.getQuickFilters();
filters.splice(1,1);

If it don't wotk, try with:

this.quickFiltersDiv.children().eq(index).remove();
Was this page helpful?
0 / 5 - 0 ratings

Related issues

john20xdoe picture john20xdoe  路  3Comments

stepankurdylo picture stepankurdylo  路  3Comments

StefanTheiner picture StefanTheiner  路  3Comments

Pinellus picture Pinellus  路  3Comments

chintankukadiya18 picture chintankukadiya18  路  3Comments