Gets the DOM element of the cell in the specified coordinates.
Namespace: MindFusion.DataViews
File: Grid.js
JavaScript Copy Code |
---|
function getCellElement (row, column) |
Number. The cell row.
Number. The cell column.
HTMLDivElement. the cell's DOM element.
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"; } } |