SafeHtmlBuilder trBuilder = new SafeHtmlBuilder();
// loop each cell per row
for (int i = 0; i < colCount; i++) {
SafeHtml rv = getRenderedValue(rowIndex, i, model, r);
ColumnConfig<M, ?> columnConfig = cm.getColumn(i);
ColumnData columnData = cs.get(i);
String cellClasses = cellClass;
if (i == 0) {
cellClasses += " " + cellFirstClass;
} else if (i == last) {
cellClasses += " " + cellLastClass;
}
String cellInnerClasses = cellInnerClass;
if (columnConfig.getColumnTextClassName() != null) {
cellInnerClasses += " " + columnConfig.getColumnTextClassName();
}
if (!columnConfig.isCellPadding()) {
cellInnerClasses += " " + styles.noPadding();
}
if (columnData.getClassNames() != null) {
cellClasses += " " + columnData.getClassNames();
}
if (columnConfig.getCellClassName() != null) {
cellClasses += " " + columnConfig.getCellClassName();
}
if (showDirtyCells && r != null && r.getChange(columnConfig.getValueProvider()) != null) {
cellClasses += " " + cellDirty;
}
if (viewConfig != null) {
cellClasses += " " + viewConfig.getColStyle(model, cm.getValueProvider(i), rowIndex, i);
}
final SafeStyles cellStyles = columnData.getStyles();
final SafeHtml tdContent;
if (enableRowBody && i == 0) {
tdContent = tpls.tdRowSpan(i, cellClasses, cellStyles, rowBodyRowSpan, cellInnerClasses, rv);
} else {
if (!selectable && GXT.isIE()) {
tdContent = tpls.tdUnselectable(i, cellClasses, cellStyles, cellInnerClasses,
columnConfig.getColumnTextStyle(), rv);
} else {
tdContent = tpls.td(i, cellClasses, cellStyles, cellInnerClasses, columnConfig.getColumnTextStyle(), rv);
}
}
trBuilder.append(tdContent);
}
if (enableRowBody) {
String cls = styles.dataTable() + " x-grid-resizer";
SafeHtmlBuilder sb = new SafeHtmlBuilder();
sb.append(tpls.tr("", trBuilder.toSafeHtml()));
sb.appendHtmlConstant("<tr class='" + rowBodyRow + "'><td colspan=" + rowBodyColSpanCount + "><div class='"
+ rowBody + "'></div></td></tr>");
SafeHtml tdWrap = null;
if (!selectable && GXT.isIE()) {
tdWrap = tpls.tdWrapUnselectable(colCount, "", rowWrap,
tpls.table(cls, rowStyles, sb.toSafeHtml(), renderHiddenHeaders(columnWidths)));
} else {
tdWrap = tpls.tdWrap(colCount, "", rowWrap,