deleteSection(section_id)

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

deletes specified section in current Timeline-Tree view.

  • section id

Note: if deleted section is a folder then all it's children will be deleted as well.

Returns true if section was deleted successfully and false in other cases, e.g. incorrect section_id was specified.

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

scheduler.createTimelineView({
        ...
	y_unit: [ 
		{key:10, label:"Web Testing Dep.", open: false, children: [
			{key:20, label:"Elizabeth Taylor"},
			{key:30, label:"Managers", open: false, 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 delete section “Linda Brown” execute:

scheduler.deleteSection(60);