Forums › Forums › OroCRM › OroCRM – How do I? Questions › make link in custom datagrid
This topic contains 12 replies, has 2 voices, and was last updated by fred33 8 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.
- CreatorTopic
- March 4, 2016 at 6:24 am #28816
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
- CreatorTopic
- AuthorReplies
- March 4, 2016 at 9:54 am #28817
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.
March 6, 2016 at 10:40 pm #28818Ok 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 thisPHP123456789101112properties:detail_edit_link:type: urlroute: CL\Bundle\DetailCdeBundle\views\Default\indexparams:- idactions:edit:type: navigatelabel: "cl.detailcde.grid-index"link: detail_edit_linkrowAction: truecorrect or not ??
and how do i built my query select in detailcde datagrid to retrieve the id parameter of entetecde datagridThanks
March 7, 2016 at 4:08 am #28819> 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.March 7, 2016 at 5:16 am #28820sorry 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
March 7, 2016 at 5:42 am #28821Could 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?
March 7, 2016 at 5:49 am #28822sorry 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 ordersthanks
March 7, 2016 at 6:12 am #28823> 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.March 7, 2016 at 6:18 am #28824OK 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
March 7, 2016 at 6:22 am #28825> 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).
March 7, 2016 at 7:00 am #28826> 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…
March 7, 2016 at 7:14 am #288271) 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: trueSee any entity grid (e.g. Users grid) for example.
March 7, 2016 at 7:24 am #28828an example without trying too hard to abuse
and I stop ask betes issuesThanks a lot for your help
- AuthorReplies
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.