Resource Grid issue when unfolding node


#1

I initially created a resource datastore and then filled it with some resources. The display works and calculates everything correctly.
grafik

Then I have reset the gantt with clearAll() and removed all tasks. This also removed all resources from the resource datastore.

Now I loaded new tasks, which automatically bring new resources with them, which I saved in the resource datastore. The display works fine at first:
grafik

But when I try to unfold department 3, I get the following error:
grafik

Version: 6.2.0


#2

Hello Yannick,
Unfortunately, I couldn’t reproduce the issue:
https://snippet.dhtmlx.com/5/9cdaf0af1
And it is hard to suggest what might be wrong as I don’t see your code. Please, reproduce the issue in the snippet, then click on the “Share” button and send me the link. Or send me an HTML file with all the necessary Javascript and CSS files.


#3

Hello ramil,
I was able to reproduce the error in your snippet, here is the link:
https://snippet.dhtmlx.com/5/c8e828193

It is important that you load different resources and not the same resources every time!
Try the following steps:

  1. Open/Close/Click some resources in resource grid
  2. Clear data
  3. Load resources
  4. Open/Close/Click some resources in resource grid
  5. Clear data
  6. Load resources
    And so on…

The snippet again gives me the following error message:
grafik


#4

Hello Yannick,
Thank you for sending the snippet. Looks like the issue occurs because Gantt wants to unselect a resource and if there are different IDs, it fails.
I will add it as a bug in our internal tracker, and the dev team will fix it.
Unfortunately, I cannot give you any ETA, but here is a workaround:
Unselect the row before using the gantt.clearAll() command:

gantt.getDatastore("resource").unselect()

Here is the updated snippet:
http://snippet.dhtmlx.com/5/c3fd04057


#5

Hello ramil,

It looks good. Since I use the unselect method I don’t get an error anymore.
Nevertheless I still have the question: When will there be a documentation of the datastore api?


#6

Hello Yannick,
Unfortunately, I cannot give you any ETA, but I reminded the dev team about it.