Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

Id for data object for the list of data objects provided in customizeCell function

Answered
Pranay Bhatia asked on October 28, 2024

Hi team ,

We have a requirement to add a tooltip on the columns , I am aware on how to add the tooltip from here : https://www.flexmonster.com/question/how-to-add-tooltip-for-gird-cell-based-on-data-value-2

But the value I need in the tooltip is part of the data object and to reference that I would need to find the index for the said data object in the list of data objects passed in the datasource.

Can you help with any attribute of the data parameter that would help me get the required index value 
I have tried , recordId as well but it is coming up as NULL

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster October 29, 2024

Hello Pranay,

Thank you for reaching out to us.

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

report: {
dataSource: {
type: "csv",
filename: "data/data.csv",
mapping: {
Color: { // name of the field with the tooltip value
type: "id",
},
},
},
// other properies
}

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

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 November 5, 2024

Hello Pranay,

Hope you are having a great week.

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

Looking forward to hearing your feedback.

Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster November 19, 2024

Hello,

Hope you are doing well.

Just checking in to ask if you had a chance to check the "id" type. Could you please confirm if the solution works for you?

Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer