OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How do i make a datagridfilter for contexts

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

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

  • Creator
  • #36574



    I want to make a filter for contexts in the call datagrid, but i dont know how to start.

    Can give me someone a hint ?

    Thanx in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
  • #36575

    Andrey Yatsenko

    Hi SkaiBoa,

    You can start from this guide https://oroinc.com/orocrm/doc/2.0/cookbook/entities/datagrids



    Thank you for you reply. But I guess its not so easy.
    I want to extends the call-grid:

    And the context column is added by this extension:

    And for this column i need a filter.

    I guess I need the right event. I found the OrmResultAfter. Is this the right one ?


    Andrey Yatsenko

    Most of the time to add grid filter for existent field you should subscribe to \Oro\Bundle\DataGridBundle\Event\BuildBefore or \Oro\Bundle\DataGridBundle\Event\BuildAfter event, as it’s easier to update grid configuration and optionally map query.

    Modification on next steps should be more complex and not always possible, like filtering should be done before processing results, so I’m not sure you can work with OrmResultAfter.

    Here is example of adding simple filter to datagrid

    And here more complex listener that adds filtering as well



    If anyone need a filter for contexts. This is how I solved the problem:

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

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

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

Yes No