Search
Grid.getCellElement Method
See Also
 






Gets the DOM element of the cell in the specified coordinates.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

function getCellElement (row, column)

 Parameters

row

Number. The cell row.

column

Number. The cell column.

 Return Value

HTMLDivElement. the cell's DOM element.

 Example

The following code gets the display value of all cells in a grid column and paints the background of those, whose value is more than 999, in red:

JavaScript  Copy Code
for(var i = 0; i < grid.model.rowCount; i++)
{
 //the column displays numbers. Length > 3 means the number is > 999
 if(grid.model.dispalyValue(i, 2).length > 3)
 {
         grid.getCellElement(i, 2).style.background = "red"; 
 }
}

 See Also