diff --git a/slick.grid.js b/slick.grid.js index c12bae9bb..166327d7f 100644 --- a/slick.grid.js +++ b/slick.grid.js @@ -1452,11 +1452,12 @@ if (typeof Slick === "undefined") { function appendCellHtml(stringArray, row, cell, colspan, item) { var m = columns[cell]; - var cellCss = "slick-cell l" + cell + " r" + Math.min(columns.length - 1, cell + colspan - 1) + - (m.cssClass ? " " + m.cssClass : ""); - if (row === activeRow && cell === activeCell) { - cellCss += (" active"); - } + var customCssClass = (typeof (m.cssClass) == 'function' ? m.cssClass(row, cell, item) : m.cssClass) || ''; + + var cellCss = "slick-cell l" + cell + " r" + Math.min(columns.length - 1, cell + colspan - 1) +' '+ customCssClass; + if (row === activeRow && cell === activeCell) { + cellCss += (" active"); + } // TODO: merge them together in the setter for (var key in cellCssClasses) { @@ -1515,7 +1516,7 @@ if (typeof Slick === "undefined") { } else { $canvas[0].removeChild(cacheEntry.rowNode); } - + delete rowsCache[row]; delete postProcessedRows[row]; renderedRows--; @@ -2162,7 +2163,7 @@ if (typeof Slick === "undefined") { $canvas[0].removeChild(zombieRowNodeFromLastMouseWheelEvent); zombieRowNodeFromLastMouseWheelEvent = null; } - rowNodeFromLastMouseWheelEvent = rowNode; + rowNodeFromLastMouseWheelEvent = rowNode; } } @@ -2217,7 +2218,7 @@ if (typeof Slick === "undefined") { cancelEditAndSetFocus(); } else if (e.which == 34) { navigatePageDown(); - handled = true; + handled = true; } else if (e.which == 33) { navigatePageUp(); handled = true; @@ -2774,7 +2775,7 @@ if (typeof Slick === "undefined") { var prevActivePosX = activePosX; while (cell <= activePosX) { if (canCellBeActive(row, cell)) { - prevCell = cell; + prevCell = cell; } cell += getColspan(row, cell); }