getCellIndex

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

number|undefined getCellIndex(string|number cellId,"row"|"col" type);

Parameters

cellIdstring|numberthe id of a cell
type"row"|"col"the type of direction to count the index

Returns

number|undefinedthe index 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.getCellIndex("r01", "row"); // gets the index of the cell
 
// -> 0

Details

The count of the index starts from 0.

See also
Change log

Added in v4.0

Back to top