Display no records found message in Gantt

Hi,

We are using DHTMLX Gantt “v.7.1.9 Professional” and our project is based on “Angular: 12.2.7”. We have provided the functionality to filter tasks in Gantt and we need to display a message when there are no matching records available with a button to clear filters (Gantt columns should be visible even though no records found). Below are the mockups for different views that can be switched by users (users can switch between grid and chart, grid only and chart only views). Could you please provide us a way to get this behavior.

Thank you.

Hello Madhuka,
Gantt doesn’t have a built-in functionality for that. You need to implement a custom solution by using the Gantt API and Javascript.

The easiest way to do that is to check the number of task rows. And if there are no tasks, you can attach an image to the grid and timeline elements. If you add a new task, the previous image will disappear because the parent element will be destroyed and recreated.
Here is an example that can help you to start:
https://snippet.dhtmlx.com/5/16783de6f

1 Like