add

selects a specified item

void add(string|number id);

Parameters

idstring|numberthe id of an item

Example

// diagram must be created with the "select:true" option
var diagram = new dhx.Diagram("diagram_container", { select: true });
diagram.data.parse(data);
 
diagram.selection.add("2");

Back to top