closeSection(section_id)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxscheduler_treetimeline.js

closes specified section in current Timeline-Tree view.

  • section id

For example, if Timeline-Tree view used the following snippet:

scheduler.createTimelineView({
        ...
	y_unit: [ 
		{key:10, label:"Web Testing Dep.", open: true, children: [
			{key:20, label:"Elizabeth Taylor"},
			{key:30, label:"Managers", open: true, children: [
				{key:40, label:"John Williams"},
				{key:50, label:"David Miller"}
			]},
			{key:60, label:"Linda Brown"},
			{key:70, label:"George Lucas"}
		]},
		{key:80, label:"Kate Moss"},
		{key:90, label:"Dian Fossey"}
	],
        ...
});

Then to close “Managers” folder execute:

scheduler.closeSection(30);