Drillthrough view customization

Predrag asked on August 6, 2019

Hi,
I want to add a button on drillthrough view ar right side of details labels. Button should collect, data from one specific row, and redirect to another Angular component. Is this possible to implement in our component?
Regards,
Predrag

3 answers

Public
Ian Sadovy Flexmonster August 7, 2019

Hello Predrag,
 
Thank you for the question.
Actually, drillthrough view is not designed to support such manipulations.
As an option, you can disable default drillthrough view (using drillThrough: false option) and handle the double click on the grid (or add custom context menu item) to open a custom modal window with the layout and data you need.
 
Hope it helps.
 
Regards,
Ian

Public
Predrag August 7, 2019

Hi Ian,
Thank you for the answer.
I will try this scenario. 
Can you provide me additional information about accessing row data in drillthrough view. I created right click context menu, and if user click on specific row, then menu appears, and then i should collect all data in selected raw.
 
Regards,
Predrag

Public
Vera Didenko Flexmonster August 8, 2019

Hello, Predrag,
 
Thank you for your reply.
 
Our team kindly suggests the following approach on how to get the data present in the clicked row:
 
1) Add a property of type id to your data.
We would like to mention that fields defined as id types will not be shown in the Field List.
 
Please see our data types in JSON guide for reference.
 
2) In the cellclick event get the id of the row data via the recordId parameter of the cell data object.
The recordId property contains the values of the id field of records that were used to compose a cell.
Via the id, you can retrieve the data which is in the row.
 
For the flat form, only one id is returned as a string. For the compact and classic forms, an array of such ids is returned.
 
Here is a JSFiddle example for illustration.
 
You are welcome to contact us in case any questions arise.
 
Best Regards,
Vera

Please login or Register to Submit Answer