:: Home >>

calculateCellState

Calculates the cell state. The cell state is a composite value which is calculated from the individual properties (cell selected, current column, current row).

The cell state is linked to the css class in the cell template and determines grid cell visual appearance.

Examples

default implementation -

obj.calculateCellState = function(i, j){
    var state = "";
    if (this.getCurrentColumn()==i && this.getCurrentRow()==j){state = "current"}
    if (this.getCellSelected(i, j)){state = "selected"}
    this.setCellState(state, i, j);
};

See also

Grid templates: cell
Cell model: text, image, tooltip, link, value, data, format, editable, state, selected

Comments

No comments yet.
Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.5.0 - 2.5.3
2.5.3
2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1
2.5
Release History
2.5
2.0.2