ssossossosso

Forums

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

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

  • Creator
    Topic
  • #17479

    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
  • #17485
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    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).

    #17486
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

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

    #17487

    Rodolfo
    Participant

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

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

You must be logged in to reply to this topic.