OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions HDI open dialog from datagrid

This topic contains 5 replies, has 2 voices, and was last updated by  Dmitry Khrysev 9 years, 5 months ago.

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

  • Creator
    Topic
  • #35887

    jakabadambalazs
    Participant

    Is there a way to open dialog from datagrid action?

    I have a working form for this update action which on new item creation opens the dialog – I’d like to open the same dialog triggered by the above row action to edit ListItem.

    I have not found any examples in the platform/crm code – is this possible do do directly from datagrid.yml? If not, is there a workaround?

    As far as I can see DataGridBundle accepts the following actions: navigate, ajax, delete, ajaxdelete with respective services. Does this mean it is not possible as for now?

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #35888

    Hi.
    This may be achieved with adding action configuration to your datagrid.yml

    For 1.4

    Please, note that in 1.4 there is a bug with widget actions, it will be merged to 1.4 in near future.
    If you need some additional logic except dialog opening you may create your own datagrid action. For this 2 things are required. First is PHP class that will implement Oro\Bundle\DataGridBundle\Extension\Action\Actions\ActionInterface (as an example you may use oro_workflow.datagrid.action.workflow_activate service) and second is JavaScript action implementation, where you can redefine action logic.

    For master branch

    #35889

    jakabadambalazs
    Participant

    is this the bug?

    If i use frontend_handle: dialog I get a js error(Uncaught TypeError: Cannot read property ‘frontend_options’ of undefined ) in method _handleWidget in file abstract-action.js:181

    so for now I could use a custom datagrid action…

    for now i resolved with a custom twig column which renders a UI.clientLink with widget type dialog.

    thanks, I’ll try to make a custom action for datagrid – sounds fun ;)

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    #35890

    jakabadambalazs
    Participant

    i fixed it like this:

    It is not much of a fix but it does the job – should i make a pull request for this or u have already fixed this?

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    #35891

    jakabadambalazs
    Participant

    No cookies! The above fix does open the dialog but it opens the same item independently from on which record you click.

    maybe the

    is needed to be fixed ;)


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    #35892

    Bug in _handleWidget already fixed and merged to master branch.

    We will check getActionParameters for bugs, thank you for reporting

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

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top