Forums OroCRM OroCRM – Installation/Technical Issues or Problems How to Pass Parameters to Dashboard Widget Grid

This topic contains 1 reply, has 2 voices, and was last updated by  Yevhen Shyshkin 1 year, 9 months ago.

  • Creator
  • #24389



    I have created a datagrid which will show the Month To Date total Sales. Now during a normal datagrid call it was easy to pass the parameters to the grid from the controller. But I want to show this grid in the dashboard widget. I followed this documentation to create a dashboard widget.

    For this dashboard widget we are calling the built-in route “oro_dashboard_widget”. So there is no controller function being called to render this datagrid. The grid will be directly rendered in the twig file by using the renderGrid function.

    Now how do I send the start date and end date as parameters to this datagrid? Can anybody please point me in the right direction? Its kind of urgent. Please. 🙂

    Thanks and Regards,

Viewing 1 replies (of 1 total)
  • Author
  • #24390

    Yevhen Shyshkin

    Hello, Madhur.

    Solution 1: You can pass additional widget parameters via widget configuration on UI (see ecommerce dashboard widgets at and click on gear icon to see “Settings”)

    Solution 2: You can render widget via controller action, here is example.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.