:: Home >>

cell state

Sets or retrieves the cell state. The cell state is a composite value which is calculated in the calculateCellState method 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.

Syntax

var value = obj.getCellState(); 
obj.setCellState(value);        

obj.onCellStateChanging = function(value){...}; 
obj.onCellStateChanged = function(value){...}; 
obj.onCellStateError = function(value){...}; 

Defined in

cell model

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, selected

Comments

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

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5