We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

get id by column hide

Answered
adriano.dorato@it-present.com asked 5 days ago

have a pivot table where the first row defined in the slice is "Project Description".
I need to access, in the callback of the cellclick event, the ProjectId of that row.
The Id is sent in the json data that feed the pivot table, but is not used in it. 
Can we have a hidden column, with the Id in it? Or can we access the json data received?

Attachments:
Immagine.png

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 2 days ago

Hello Adriano,

Thank you for reaching out to us.

We recommend setting the type: "id" in the Mapping object for the ProjectId field. For example:

report: {
dataSource: {
data: getData(),
mapping: {
RecordID: {
type: "id",
},
},
},
// other configs
}

This way the values of the RecordId field are returned in the CellDataObject.recordId property of the cellclick event. Also, an "id" field is not shown in the Field List. Please check the following example: https://jsfiddle.net/flexmonster/zwrdL76q/

Kindly note that the "id" type is only supported for "json" and "csv" data source types. You are welcome to check the following guide for reference: https://www.flexmonster.com/doc/mapping/

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer