TabSheetCell.IsDefault

Syntax

IsDefault: Boolean

Description

The IsDefault property sets the default cell.

Comments

Use JSON or the setIsDefault method to set the property value, and the getIsDefault method to get the property value.

If the property is set to True, no JSON format metadata was available for this cell. That is why a default cell has been generated. Otherwise, the property is set to False.

Example

To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Set a string value 16 for the cell under coordinates (0, 1), make this cell available if it has been unavailable, and render the cell to show the changes:

// Get table model
var model = tabSheet.getModel();
// Get coordinates
var coord = tabSheet.coord(0, 1);
// Get coordinate by cell
var cell = model.getCell(coord);
// Enable access to cell if access to it is not enabled
if (!cell.getIsEnabled()) {
    cell.setEnabled(true)
};
cell.setIsDefault(false); // Cell should not be set as default
// Set value for cell
cell.setRawValue("16");
/* Then render this cell */
// Get measures
var m = tabSheet.getMeasures();
var doc = document,
    css = PP.Ui.TabSheetCSS;
var iDiv, iiDiv, cellNode, cellToRender;
var container = null;
// Determine size of area to be rendered
var size = {
    height: m.getRowHeight(coord.rowIndex, true),
    width: m.getColumnWidth(coord.colIndex, true)
};
// Determines whether this cell is default
var defaultCell = cell.getIsDefault();

After executing the example string value 16 is set for the cell under coordinates (0, 1), and after that the cell is rendered:

Seebsp;also:

TabSheetCell