ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 12 replies, has 2 voices, and was last updated by  fred33 1 year, 6 months ago.

  • Creator
    Topic
  • #16829

    fred33
    Participant

    Hi
    I created a entete order datagrid and I would like when I click on the line bring up a new screen showing the details of selected entete order… How can i do this ??

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • Author
    Replies
  • #16831
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Hello.

    You need to have row action that leads to page with order details, and then you should mark this action as default row action.

    #16840

    fred33
    Participant

    Ok that’s what i’m trying to test, let me explain what i did:
    I have a entetecde entity with datagrig in src/CL/Bundle/entetecde/Resources/config/
    i have a detailcde entity whith datagrid in src/CL/Bundle/detailcde/Resources/config/
    in my entetecde datagrid i did this

    correct or not ??
    and how do i built my query select in detailcde datagrid to retrieve the id parameter of entetecde datagrid

    Thanks

    #16844
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    > correct or not ??
    You need to specify route name that leads to the specific page, not the template of this page. So, instead of route: CL\Bundle\DetailCdeBundle\views\Default\inde you should put there route name.

    > and how do i built my query select in detailcde datagrid to retrieve the id parameter of entetecde datagrid
    If I understand you correctly you want to open view or edit page of some entity (detailcde?) from grid that shows these entities. In this case you don’t need to use enother entity grids – just make sure that you have entity identifier in query and in properties.

    #16847

    fred33
    Participant

    sorry i don’t understand your solution…
    the user can see his client entetecde if they wish by selecting the line bring up the detail of the order
    entetecde datagrid
    client/ libelle client/ numero_cde/ CAHT/ …….

    detailcde datagrig
    numero_cde/ client/ article/ qte/ CAHT_ligne/ ………

    that’s what i have

    thanks

    #16849
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    Could you clarify your question? Do you want to open another page with a details of a selected line? Or do you want to open a popup with additional grid? Or do you want just redirect to another grid with applied filters? Or do you want to render grid inside a grid row?

    #16850

    fred33
    Participant

    sorry i think i should start with that. I want to test 2 solutions :
    redirect to another grid with applied filters and render grid inside a grid
    becaufe the user might want to see the detail of several orders

    thanks

    #16853
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    > redirect to another grid with applied filters
    In this case you have redirect to a page with applied filters. First way to do that – create custom property (e.g. extended from UrlProperty) and generate URL with applied filters there. Second way – pass entity identifier parameter to URL using regular “url” property and then apply filters on ending page.

    > render grid inside a grid
    Unfortunately, you can’t do that out of the box. First solution – you can listen to “clicked” row action and render related grid after a grid row there (related grid can be prerendered and passed to UI as property). Second solution – you can add separate twig column with row details – e.g by default it might contain only link “Show details”, and after clicking it will be replaced with related grid.

    #16854

    fred33
    Participant

    OK all this solutions are not very simple, I did not understand half of what you said ;), finally what is the simplest solution is put in place ?

    Thanks

    #16855
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    > you can add separate twig column with row details – e.g by default it might contain only link “Show details”, and after clicking it will be replaced with related grid

    If you want to grid inside a grid – this is the simplest one – you just need to add template for main grid column and render related grid there.

    Alternative easy solution – you can create small page to render details grid and redirect to it on row click (like a view page for entity).

    #16856

    fred33
    Participant

    > Alternative easy solution – you can create small page to render details grid and redirect to it on row click (like a view page for entity).

    That’s what i want…

    #16857
    Yevhen Shyshkin
    Yevhen Shyshkin
    Oro Core

    1) Create controller action that receives required parameters (identifier of an entity)
    2) Create template for this controller that renders required information (grid with details)
    3) Add route to this controller action, make sure page rendered correctly on UI
    4) Add property (with controller route) and action at main entity grid, mark action with rowAction: true

    See any entity grid (e.g. Users grid) for example.

    #16858

    fred33
    Participant

    an example without trying too hard to abuse
    and I stop ask betes issues

    Thanks a lot for your help

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

You must be logged in to reply to this topic.