Posted 14 September 2017, 11:22 am EST
Hello,
We apologize for the delayed response. You can use the following code to get the cell element in an external function and use the addClass method to set the css on the cell:
[js]
// get a grid cell from the row/col indices
function getGridCell(r, c) {
// find the cell from its bounding rectangle
var rc = grid.getCellBoundingRect(r, c);
var cell = document.elementFromPoint(rc.left + rc.width / 2, rc.top + rc.height / 2);
// make sure this is a regular cell (not a header)
if (wijmo.hasClass(cell, 'wj-header')) {
cell = null;
}
// make sure this is not an element within a cell
while (cell && !wijmo.hasClass(cell, 'wj-cell')) {
cell = cell.parentElement;
}
$(cell).addClass("test");
}
[/js]
Kindly refer to the attached HTML Page which implements the same. Hope it helps.
Thanks,
Manpreet Kaur
2015/08/CellCss.html