get id by column hide

Answered
adriano.dorato@it-present.com asked on October 11, 2024

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

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 14, 2024

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

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 22, 2024

Hello Adriano,

Hope you are having a great week.

We were wondering if you had a chance to check the suggested approach with the id data type. Could you please confirm if it works for you?

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 29, 2024

Hello Adriano,

Hope you are doing well!

Just checking in to ask if you had a chance to check the suggested approach with the "id" type. Please let us know if it works for you.

Looking forward to hearing your feedback.

Kind regards,
Nadia

Please login or Register to Submit Answer