OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Datagrid filter is not being applied

This topic contains 2 replies, has 2 voices, and was last updated by Andrey Yatsenko Andrey Yatsenko 2 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #38956

    William Radi

    Hello guys!

    I added a custom field in my Account entity: host location.

    The only problem with this field occurs when someone try to filter it. The default method (checkbox), created by Oro, would work, but it’s veeeeery slow, because it returns almost 6000 results at once.

    So, I tryed to change the filter type through event listener, but with the event listener the filter stops to work. If I try to select only rows where host location is blank, for exemple… I appli the filter, but nothing happens. All the rows still there.

    Here is my listener:

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #38962

    William Radi


    Problem solved!
    There was another “host_location” field: host_location_identity.

    But now, there is another doubt: how do I get all the columns that are used to build the datagrid?

    Andrey Yatsenko
    Andrey Yatsenko

    But to get the full list, including columns added in other listeners, your listener must be the last.

    There is an optional attribute for the kernel.event_listener tag called priority, which is a positive or negative integer that defaults to 0 and it controls the order in which listeners are executed (the higher the number, the earlier a listener is executed). This is useful when you need to guarantee that one listener is executed before another. The priorities of the internal Symfony listeners usually range from -255 to 255 but your own listeners can use any positive or negative integer.

    See https://symfony.com/doc/3.4/event_dispatcher.html

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No