FlexGridFilter not getting applied or not working

Posted by: pradnya.choudhari on 29 October 2019, 11:26 am EST

    • Post Options:
    • Link

    Posted 29 October 2019, 11:26 am EST

    Hello,

    I am using wj-flex-grid along with wj-flex-grid-filter.

    Here is my code.

    In the Html file I have below code.

    <wj-flex-grid #displayGrid class=“expand-to-fit”

    [itemsSource]=“gridCollection”

    [isReadOnly]=“true”

    [headersVisibility]=“‘Column’”

    [selectionMode]=“‘None’”

    [allowSorting]=“false”

    [allowResizing]=“‘None’”

    [allowDragging]=“‘None’”

    [showAlternatingRows]=“false”

    [frozenColumns]=“0”

    >

    <wj-flex-grid-filter #filter [filterColumns]=“[‘Full Name’,‘Abbreviation’]”>

    and in the component.ts I have below code.

    @ViewChild(‘displayGrid’) grid: wijmo.grid.FlexGrid;

    @ViewChild(‘filter’) filter: wijmo.grid.filter.FlexGridFilter;

    gridCollection:wijmo.collections.CollectionView;

    ngAfterViewInit(){

        if(this.grid) {
    
            this.grid.itemFormatter = this._gridItemFormatter.bind(this);  
        
    this.grid.updatedView.addHandler(this._onGridUpdatedView.bind(this));
            this.filter.defaultFilterType = wijmo.grid.filter.FilterType.Condition;
            this.filter.showSortButtons = false;
        }
    
        this.viewInit = true;
    }
    

    I can see the filter icons on the columns but when I search for some specific data, the filter doesn’t work. It won’t display any rows even though I know the value is there.

    thanks

    Pradnya

  • Posted 30 October 2019, 2:18 am EST

    Hi Pradnya,

    We are sorry but we were not able to understand your issue properly. If you set the default filter to Condition, you cannot search through the data. Searching can only be performed in the Value filter.

    Could you please explain more about the issue so that we can assist you accordingly?

    Regards,

    Ashwin

  • Posted 30 October 2019, 9:41 am EST

    Hi Ashwin,

    I was able to figure out the issue. I was incorrectly binding the columns. Also the filterColumns defined for the filter in the html should use the actual columns and not the column headers.

    Its working now.

    thank you,

    Pradnya

  • Posted 30 October 2019, 11:12 pm EST

    Hello again,

    We are glad that you were able to resolve the issue. Let us know in case you have any additional queries.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels