OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Display different datagrid columns based on selected filter value

This topic contains 2 replies, has 3 voices, and was last updated by  Yevhen Shyshkin 8 years, 1 month ago.

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

  • Creator
    Topic
  • #34078

    stefano93
    Participant

    Hello, I would like to have a datagrid that shows some data from the database. The grid has some filters too (choice filter) that should not only filter the data, but also change the displayed columns. For example, let’s say the list of all table columns are:

    • ColumnA
    • ColumnB
    • ColumnC

    And the filter values are:

    • FilterA
    • FilterB

    The first column must always be shown, regardeless of the filter value. If I choose FilterA, then only the columns ColumnA and ColumnB should be visible. If I choose FilterB instead, only columns ColumnA, ColumnC should be visible. Is it possible to do something like this?

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

    Artem Liubeznyi
    Spectator

    Hi Stefano,

    Looks like grid views might solve your case.

    #34080

    Yevhen Shyshkin
    Participant

    Hello.

    Grid views allow you to save different grid states under some names.

    If you require more flexible or dynamic logic – you should do that on JavaScript level. You can add your JS datagrid builder and put there your logic – e.g. you can listen to collection event (beforeFetch or sync), read collection’s state and show/hide some columns depends on filters value (see renderable option of a column).

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

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

Back to top