Filter on resource select


I want to filter data when I click on a resource or task in the resource panel.

Is that possible?

Hello Stefan,
To filter tasks, you need to use the onBeforeTaskDisplay event handler:

Here are examples of how it can be implemented:

If you want to filter resources, you need to use the onFilterItem event handler:
Here is an example:

Hi Ramil,

thanks for the quick response! Filtering works… but how can I trigger it by clicking on a row-header in the resource panel like in the screenshot?

Hello Stefan,
You need to use the onEmptyClick event handler that fires when you click on empty space and on the resource cell:
There, you need to call the filter function after a timeout. Otherwise, the selected resource will be updated after Gantt repainted the data, and you will need to call the render function more times.
Here is the snippet: