getCellId

returns the id of the cell of the swimlane by the index

id|undefined getCellId(number cellIndex,"row"|"col" type);

Parameters

cellIndexnumberthe start index of a cell in a layout
type"row"|"col"the type of direction to count the index

Returns

id|undefinedthe id of the cell

Example

// initialization of the diagram
const diagram = new dhx.Diagram("diagram_container", {
    // config options
});
diagram.data.parse(data);
 
diagram.cellManager.setSwimlane("main"); // sets active swimlane
 
diagram.cellManager.getCellId(0, "row"); // gets the id of the cell
 
// -> "r01"

Details

The count of the index starts from 0.

See also
Change log

Added in v4.0

Back to top