ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 1 reply, has 2 voices, and was last updated by  Dmitriy Pasechnik 4 months ago.

  • Creator
    Topic
  • #34620

    wojtekson16
    Participant

    Hello,

    I’ve got a question related to the datagrid… Inside datagirid.yml there is date filter on one of columns, but I want also to append this date filter to another column(without creating new filter on front), so it filter two columns at once. Is there any additional parameter in filter config so I could easily achieve it? If it’s not possible is there a way to write own custom filter and within it append two columns filter?

    Thanks you in advance for any answers and help.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #34664

    Dmitriy Pasechnik
    Participant

    Hello wojtekson16.

    Unfortunately, you cant use existing filters to filter grid by 2 columns at once.
    But, of course, you always can create your own filter.
    To implement it you have to do following:

    1) Develop class that implements Oro\Bundle\FilterBundle\Filter\FilterInterface (also take a look at current implementation of \Oro\Bundle\FilterBundle\Filter\AbstractDateFilter and its heir \Oro\Bundle\FilterBundle\Filter\DateRangeFilter – its a current implementation of ‘date’ filter, so you can use it as a basis)
    2) Register you filter as service with tag { name: oro_filter.extension.orm_filter.filter, type: YOUR_FILTER_TYPE }

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.