Clear selection without to click other task


#1

Dear All!
My project need to click a button to clear selection…
but I can’t find any API to do it…
So,Pls help me

Thank you!


#2

Hello @huiping,

You can unselect each task you want using the gantt.unselect() method.

Here is an example of usage:
http://snippet.dhtmlx.com/5/0c7ce27d9

API:
https://docs.dhtmlx.com/gantt/api__gantt_unselecttask.html