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;
cellClasses += (i == 0 ? cellFirstClass : (i == last ? cellLastClass : ""));
if (columnConfig.getColumnTextClassName() != null) {
cellInnerClass += " " + columnConfig.getColumnTextClassName();
}
String id = columnConfig.getColumnClassSuffix();
if (columnData.getClassNames() != null) {
cellClasses += " " + columnData.getClassNames();
}
if (id != null && !id.equals("")) {
cellClasses += " x-grid-td-" + id;
}
if (showDirtyCells && r != null && r.getChange(columnConfig.getValueProvider()) != null) {
cellClasses += cellDirty;
}
if (viewConfig != null) {
cellClasses += " " + viewConfig.getColStyle(model, cm.getValueProvider(i), rowIndex, i);
}
SafeStylesBuilder cellStyles = new SafeStylesBuilder();
cellStyles.append(columnData.getStyles());
SafeHtml tdContent = null;
if (enableRowBody && i == 0) {
tdContent = tpls.tdRowSpan(i, cellClasses, cellStyles.toSafeStyles(), rowBodyRowSpan, rv);
} else {
tdContent = tpls.td(i, cellClasses, cellStyles.toSafeStyles(), cellInnerClass,
columnConfig.getColumnTextStyle(), rv);