Multiple resources lightbox control


I’m implementing multiple resources capabilities, and using the lightbox resources control that comes with it. But that seems to re-init the owner_id object on the task (with the resource ids and values) on a lightbox save. I store other things in that object (like a date and a unique code for the back-end system), that seems to disappear after the lightbox save.

Could you check what’s happening, and if there’s a solution for keeping that object intact and only changing values? Thank you.

Kind regards,


Hello Maurice,
Unfortunately, there is no easy solution.
The current resource control completely replaces resource assignment objects on saving.
So you’ll have to do the mapping between resource assignment objects in gantt and in your store manually somehow.

Alright. I’m creating a DHTMLXGrid for this now. Can you help me get started on how to get the resource assignment objects (like the standard resources control does)?

Hello Maurice,
Please, check the following snippets:
The template of the owner_id column config explains how to get owners.

The following sample allows specifying working hours, and it will be reflected in the resource chart:
So, you can check gantt.templates.resource_cell_value template, as it explains which functions you need to use to get the number of hours.

And I have one more snippet that is similar to the previous sample:
It has a function that checks all resources and finds if they have any tasks. The resources without tasks move to “no_tasks” category.

Got something working with the grid, datastore and getting assignments from one of the snippets.
Thank you!