OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions buildBefore/buildAfter on Extended Datagrid Filters?

This topic contains 3 replies, has 2 voices, and was last updated by  Rodolfo 7 years, 11 months ago.

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

  • Creator
    Topic
  • #34122

    Rodolfo
    Participant

    Hi Oro Community,

    How can I customize a datagrid filter when I have a field that was added using the entity management?

    I’m extending and overriding TrackingBundle in order to remove some wildcard filters (contains, does not contains) from ‘website-tracking-events-grid‘. When you have some millions of rows, full-text-search becomes a very heavy query for this tracking datagrid.

    I managed to customize most of my fields with Event Listener (buildBefore) and I would like to make the same action for Extended Datagrid Fields. These extended fields are not showing up when I call $event->getDatagrid().

    This is the snippet of code I’m using to override the filters for the fields that come with TrackingBundle:

    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #34123

    Yevhen Shyshkin
    Participant

    Hello, Rodolfo.

    Easy solution – you can use BuildAfter event – at this moment configuration already contains all required infoermation

    Alternative solution – you ca create grid extension (for example, here is extension that adds all such fields). You should create your own extension (usually extended from AbstractExtension) and do required fixes in on the methods (processConfigs in your case).

    #34124

    Yevhen Shyshkin
    Participant

    Also, instead of manual grid name checking you can use custom event names.

    #34125

    Rodolfo
    Participant

    Always with the best answers! Thank you very much @yshyshkin !

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

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

Back to top