Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroPlatform OroPlatform – Programming Questions Data Grid with Parameter

This topic contains 3 replies, has 3 voices, and was last updated by prganvani prganvani 1 year, 8 months ago.

  • 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
    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
    prganvani
    Participant

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

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

You must be logged in to reply to this topic.

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

Yes No
sso for www.magecore.comsso for oroinc.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for marketplace.orocrm.com