closeSection(section_id)

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

returns section object by id 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 get “Managers” section execute:

scheduler.getSection(30);

Following object would be returned:

{
	key: 30,
	label: "Managers",
	open: true,
	level: 1,
	children: [
		{ 
			key: 40,
			label: "John Williams",
			level: 2
		},
		{
			key: 50,
			label: "David Miller",
			level: 2
		}
	]
}