Forum Discussion
Hi!
You need some additional code to get the id. Something like this:
const dataObjectAsString = gridData.focus[0].row.cells[0].data;
const dataObject = JSON.parse(dataObjectAsString);
const itemId = dataObject.id;
Angela
Hi Angelalp,
Thanks for the feedback. It still showed the same invalid id with the added parse code.
But, i found the root issue and it was related to the configuration of the Tree Grid View. The "Data Template" on the mapped element was incorrect. When i updated it to "{"id": "{Task.id}", "type": "Task"}" on the Task name property everything worked as intended.
Bernt Ove
- AngelaIp3 years agoIdeator I
I right now noticed that my code never would have worked in your scenario. Why should you parse something that is already invalid? You just get an even more invalid result...
Happy to hear that you solved it!