Skip to main content

getSpan()

returns an object with spans

getSpan(rowId: string | number, colId: string | number): object;

Parameters:

  • rowId: string | number - the id of a row
  • colId: string | number - the id of a column

Returns:

An object with configuration of a span.

Example

const span = treegrid.getSpan("10","a"); 
// -> {row:"10", column:"a", colspan:4, text:"Some header", css:"myCustomColspan"}

A returned span object contains the following properties:

row(string|number) mandatory, the id of a row
col(string|number) mandatory, the id of a column
rowspan(number) optional, the number of rows in a span
colspan(number) optional, the number of columns in a span
text(string|number) optional, the text in a spanned row/column
css(string) optional, the name of the CSS class that will be applied to a span