TabSheetCell.getModel

Syntax

getModel();

Description

The getModel method returns model of the table that contains the given cell.

Comments

This method returns a PP.Ui.TabSheetModel object.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Create a copy of the cell with coordinates (0, 1) and check if coordinates of the created copy have changed:

// Determine coordinates (0, 1)
var coord = tabSheet.coord(0, 1);
// Get cell with coordinates (0, 1)
var cell = tabSheet.getModel().getRealOrChangedCell(coord);
// Create cell copy with coordinates (0, 1)
var oldCell = cell.getModel().getRealOrChangedCell(coord).clone();
// Check if cell copy coordinates are changed
var isSame = (cell.getCoord() == oldCell.getCoord());
if (isSame) {
    console.log("Cell copy has coordinates (0, 1)");
} else { 
    var newCoord = cell.getCoord();
    console.log("Cell copy has new coordinates: (" + newCoord.rowIndex + ", " + newCoord.colIndex + ")")
};

After executing the example a copy of the cell with coordinates (0, 1) is created, coordinates of the created copy remain the same. An appropriate message is displayed to the browser console:

Seebsp;also:

TabSheetCell