Our pure JavaScript Scheduler component


Post by jungo »

Hi Bryntum team, I'm having a problem with the "Id collision" error.
Currently I am using the Tree Grid format like the example here: https://www.bryntum.com/examples/grid/tree/.
First, I used the sample here: https://bryntum.com/examples/scheduler/grouping/ then in my code there was only resourceStore.add (array_resources) when the data was added. But since switching to TreeGrid I get "Id collision" error. I've been looking for some solutions to fix this problem, but it's not done yet. I know ID must be unique so I want that when I execute add() function you can check if ID exists or not?. If yes then execute, if not then stop? Is this possible?

id_collision.jpg
id_collision.jpg (68.48 KiB) Viewed 203 times

Post by mats »

You can simply run getById to find out if the record already exists before you add?


Post by jungo »

@mats Thanks a lot. You saved my day :D


Post Reply