Flex grid filtering: Rows deleted

Posted by: developer on 29 July 2018, 11:14 pm EST

    • Post Options:
    • Link

    Posted 29 July 2018, 11:14 pm EST

    Hi

    I use the FlexGridFilter to filter rows in flexgrid. I have the situation that I have some dependencies between the rows like in a hierarchical grid. So I have to set some rows to visible after the filter is applied.

    I have done the same in the WPF flexgrid in the filterApplied event and tried to do the same in wijmo flexgrid. But now I have the problem that the flexgrid.rows collection in wijmo only contains the visible rows after filtering, all filtered out rows are gone. How can I access the invisible rows to make some of them visible again?

    Or can I somehow apply the defined filters from FlexGridFilter manually to the rows and set them invisible?

    Best Regards

    Martin Vogt

  • Posted 30 July 2018, 11:30 pm EST

    Hi,

    FlexGridFilter doesn’t hide rows to filter, it uses a filter function on underlying collectionView’s instance.

    So when we filter rows their binding from the grid is removed hence they are not available.

    If you wish to show/hide rows on filter then you are required to perform 2 steps:-

    1). Remove filter function from gird.collectionView’s instance(to preserve row bindings for all rows).

    2). Set row’s visibility to false if it fails the filter.

    Please refer to the following sample which implements the same:-

    https://stackblitz.com/edit/angular-nvzikc?file=app%2Fapp.component.ts

    ~Manish

Need extra support?

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

Learn More

Forum Channels