Filter by Name

Can we create a filter that can filter the tasks by its name?
For example:

  • Task 1
    phase 1
    phase 2
    phase 3
  • Task 2
    phase 1
    phase 2
    phase 3

Add I want to add the filter like:
Filtering: -phase1 -phase2 -phase3 (three radio buttons here)

I tried gantt_filter = node.value, where node is the radio button,
but it didn’t work…

Also, I tried gantt.attachEvent… but not sure which one should I use, I tried “onBeforeTaskDisplay”…doesn’t work well ~~

Please help ~ thanks

Hello,
onBeforeTaskDisplay should work exactly the same way as in a filtering sample from a package, except for changes you have to do in order to make it work with a radio buttons instead of checkboxes
docs.dhtmlx.com/gantt/samples/07 … ering.html

Here is a working demo
docs.dhtmlx.com/gantt/snippet/469b27da

Hi, I have used onBeforeTaskDisplay, my code is as following:
function filterOption(node)
{
gantt.attachEvent(“onBeforeTaskDisplay”,function(id,tasks){
if(tasks.text == node.value)
return true;
});
gantt.render();
}

it works at first time I select a radio button, but then, seems not refresh data again…so the second time I click a radio button, it filter from the last result…can’t figure out why >_<

Solved !!! I made a stupid mistake ~~thanks !!!