gantt grid with search filter

Hello,

TreeGrid has features: Search and Filtering by embeded text fields.
dhtmlx.com/docs/products/dhtmlxT … ering.html

Is it possible to embed such filter to gantt grid part?

Thanks for any help!

Hello,
there is no built-in fuctionality. You can put an input in the column header (set html in a ‘label’ property), and attach a onkeypress handler to it. Then you’ll be able to filter gantt tasks based on a input text using a public api
docs.dhtmlx.com/gantt/desktop__filtering.html

Thanks a lot for help. I’ll try it.

In general it works ok.

but if sorting is enabled (gantt.config.sort = true;) than sorting catch all events include onkeyup for text field and always work sorting instead onkeyup.

You can use something like next

<input onclick='e.cancelBubble = true;' type='text'>

such click handler will block further event processing, so gantt will not react on clicks in the custom filter input. Similar can be done with any other event, that must not be processed by the gantt

Upd:

We created a snippet code that demonstrates how that might be implemented and added the description in the article in the documentation. To get more information, please find “Custom elements in the grid header” on the page here https://docs.dhtmlx.com/gantt/desktop__styling_guide.html#stylinggrid

and check the snippet https://snippet.dhtmlx.com/43a01395c