ssossossossosso

Forums

Forums OroPlatform OroPlatform – Programming Questions Datagrid Choice Filter with choices from a Column

This topic contains 7 replies, has 4 voices, and was last updated by  oro_newbie 1 year, 5 months ago.

  • Creator
    Topic
  • #28679

    Dima Makaruk
    Participant

    How is it possible to create a datagrid filter that contains distinct values from a column of the grid ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #28680

    Artem Liubeznyi
    Keymaster

    Hi Dima,

    Not sure I correctly understand your question. Would you mind to provide a concrete use case you’d like to achieve? Thank you.

    #28681

    Mike Kudelya
    Moderator

    Hi!

    You should create custom provider, which return list of entities and configure QueryBuilder as you want.

    setup provider as service

    and configure your filter, something like this:

    #28682

    Dima Makaruk
    Participant

    Hi

    Thank you for the quick reply. I think it won’t work with the provider. I need to get only the values/entities that are present in the datagrid resultset. But the filters are build before the datagrids datasource has the results.

    #28683

    Mike Kudelya
    Moderator

    You want to put to filter values from certain column only from current page, right?

    #28684

    Dima Makaruk
    Participant

    Yes,
    from current datagrid.

    #28685

    oro_newbie
    Participant

    @Mike

    I needed this and it’s very well explained. Thank you!

    #28686

    oro_newbie
    Participant

    @Mike

    As an added question, is it possible to pass a parameter to the getList() function? In my case the parameter is the same that I’m passing to my where clause in my datagrid (defined under bind_parameters).

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

You must be logged in to reply to this topic.