OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Data Grid with Parameter

This topic contains 3 replies, has 3 voices, and was last updated by  prganvani 7 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
  • #33420

    rajajitesh
    Participant

    Hi,

    I have tried to follow the cook book recipe for creating a data grid with parameters, however the example which has been elaborated in the cook book is relevant to widget, since whenever i try to render the grid in an empty template file, all i get is a blank page. Your example works when i try to display the data grid as a widget but doesn’t work when i try to display it separately similar to {% set gridName = ‘event-grid’ %} in a separate template file.

    Is there any way to use parameter in {% set gridName = ‘event-grid’ %} as is seems the {{ dataGrid.renderGrid(‘myGrid’, {eventId: entity.id}) }} only works as widget inside a parent body but not as a individual grid?

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

    ignat
    Participant

    Hello,

    In case if you are using index page in your bundle, probably your view is extended from OroUIBundle:actions:index.html.twig.

    Please provide a twig variable “params” in your template, for example:

    Thanks,
    Ignat

    #33422

    rajajitesh
    Participant

    Thank you vey much, it solved my problem.

    #33423

    prganvani
    Participant

    Now How to use this EntityId in datagrid.yml???

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

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

Back to top