// buffers
StringBuilder buf = new StringBuilder();
StringBuilder cb = new StringBuilder();
for (int j = 0, len = rows.size(); j < len; j++) {
ModelData model = (ModelData) rows.get(j);
Record r = ds.hasRecord(model) ? ds.getRecord(model) : null;
int rowIndex = (j + startRow);
boolean visible = rowIndex >= vr[0] && rowIndex <= vr[1];
if (visible) {
for (int i = 0; i < colCount; i++) {
ColumnData c = cs.get(i);
c.css = c.css == null ? "" : c.css;
String rv = getRenderedValue(c, rowIndex, i, model, c.name);
String css = (i == 0 ? "x-grid-cell-first " : (i == last ? "x-grid3-cell-last " : " ")) + " "
+ (c.css == null ? "" : c.css);
String attr = c.cellAttr != null ? c.cellAttr : "";
String cellAttr = c.cellAttr != null ? c.cellAttr : "";
if (isShowDirtyCells() && r != null && r.getChanges().containsKey(c.id)) {
css += " x-grid3-dirty-cell";
}
cb.append("<td class=\"x-grid3-col x-grid3-cell x-grid3-td-");
cb.append(c.id);
cb.append(" ");
cb.append(css);
cb.append("\" style=\"");
cb.append(c.style);
cb.append("\" tabIndex=0 ");
cb.append(cellAttr);
cb.append("><div class=\"x-grid3-cell-inner x-grid3-col-");
cb.append(c.id);
cb.append("\" ");
cb.append(attr);
cb.append(">");
cb.append(rv);
cb.append("</div></td>");
}
}
String alt = "";
if (stripe && ((rowIndex + 1) % 2 == 0)) {
alt += " x-grid3-row-alt";
}
if (isShowDirtyCells() && r != null && r.isDirty()) {
alt += " x-grid3-dirty-row";
}
if (viewConfig != null) {
alt += " " + viewConfig.getRowStyle(model, rowIndex, ds);