Represents a table row - a collection of cell objects (Cell).

Example

// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Get all rows
var rows = tableCtrl.getRows();

// Get cells of first row
var firstRowCells = rows[0].getCells();
console.log(firstRowCells);

// Get html element of first row
var firstRow = rows[0].getHtml()[0];
// Change first rows background color to blue
firstRow.style.backgroundColor = "blue";

Hierarchy

  • Row

Implements

Implemented by

Methods

  • Get a table cell.

    Parameters

    • guid: string

    Returns null | Cell

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get all columns
    var cols = tableCtrl.getCols();
    // Get all cells of first column
    var cells = cols[0].getCells();
    // Get html element of first cell
    var firstCell = cells[0].getHtml()[0];
    console.log(firstCell);
  • Returns Cell[]

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Get cells of first row
    var firstRowCells = rows[0].getCells();
    // Get html element of first cell
    var firstCell = firstRowCells[0].getHtml()[0];
    // Change background color of first cell in first row
    firstCell.style.backgroundColor = "blue";
  • Returns a jQuery list with one or more HTML nodes (e.g. <tr> or <li>).

    Returns JQuery<HTMLElement>

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get all columns
    var rows = tableCtrl.getRows();
    // Get html element of first row
    var firstRow = rows[0].getHtml()[0];
    // Change first rows background color to blue
    firstRow.style.backgroundColor = "blue";
  • Get the parent record id.

    Returns any

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Get parent recId of first row
    var firstRowParentRecId = rows[0].getParentRecId();
    console.log(firstRowParentRecId);
  • Get the record id.

    Returns any

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Get all row recIds and store it in an array
    var rowRecIds = rows.map((row) => row.getRecId());
    console.log(rowRecIds);
  • Get the records actual position.

    Returns any

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Iterate over each row
    rows.forEach((row) => {
    // Get row position
    var rowPosition = row.getRecPosition();
    // Check if row position is even and style all even rows background color green
    if (rowPosition % 2 === 0) {
    var rowHtml = row.getHtml()[0];
    rowHtml.style.backgroundColor = "green";
    }
    });
  • Hides the record row.

    Returns void

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Iterate over each row
    rows.forEach((row) => {
    // Get row position
    var rowPosition = row.getRecPosition();
    // Check if row position is even and hide them so only odd rows are shown
    if (rowPosition % 2 === 0) {
    row.hide();
    }
    });
  • Remove the row from DOM.

    Returns void

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Remove first row from DOM
    rows[0].remove();
  • Makes the row visible.

    Returns void

    Example

    // Get table
    var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
    // Get rows
    var rows = tableCtrl.getRows();
    // Show first row
    rows[0].show();