+
+ refreshRow: function(record){
+ var store = this.ds,
+ colCount = this.cm.getColumnCount(),
+ columns = this.getColumnData(),
+ last = colCount - 1,
+ cls = ['x-grid3-row'],
+ rowParams = {
+ tstyle: String.format("width: {0};", this.getTotalWidth())
+ },
+ lockedRowParams = {
+ tstyle: String.format("width: {0};", this.getLockedWidth())
+ },
+ colBuffer = [],
+ lockedColBuffer = [],
+ cellTpl = this.templates.cell,
+ rowIndex,
+ row,
+ lockedRow,
+ column,
+ meta,
+ css,
+ i;
+
+ if (Ext.isNumber(record)) {
+ rowIndex = record;
+ record = store.getAt(rowIndex);
+ } else {
+ rowIndex = store.indexOf(record);
+ }
+
+ if (!record || rowIndex < 0) {
+ return;
+ }
+
+ for (i = 0; i < colCount; i++) {
+ column = columns[i];
+
+ if (i == 0) {
+ css = 'x-grid3-cell-first';
+ } else {
+ css = (i == last) ? 'x-grid3-cell-last ' : '';
+ }
+
+ meta = {
+ id: column.id,
+ style: column.style,
+ css: css,
+ attr: "",
+ cellAttr: ""
+ };
+
+ meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store);
+
+ if (Ext.isEmpty(meta.value)) {
+ meta.value = ' ';
+ }
+
+ if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') {
+ meta.css += ' x-grid3-dirty-cell';
+ }
+
+ if (column.locked) {
+ lockedColBuffer[i] = cellTpl.apply(meta);
+ } else {
+ colBuffer[i] = cellTpl.apply(meta);
+ }
+ }
+
+ row = this.getRow(rowIndex);
+ row.className = '';
+ lockedRow = this.getLockedRow(rowIndex);
+ lockedRow.className = '';
+
+ if (this.grid.stripeRows && ((rowIndex + 1) % 2 === 0)) {
+ cls.push('x-grid3-row-alt');
+ }
+
+ if (this.getRowClass) {
+ rowParams.cols = colCount;
+ cls.push(this.getRowClass(record, rowIndex, rowParams, store));
+ }
+
+ // Unlocked rows
+ this.fly(row).addClass(cls).setStyle(rowParams.tstyle);
+ rowParams.cells = colBuffer.join("");
+ row.innerHTML = this.templates.rowInner.apply(rowParams);
+
+ // Locked rows
+ this.fly(lockedRow).addClass(cls).setStyle(lockedRowParams.tstyle);
+ lockedRowParams.cells = lockedColBuffer.join("");
+ lockedRow.innerHTML = this.templates.rowInner.apply(lockedRowParams);
+ lockedRow.rowIndex = rowIndex;
+ this.syncRowHeights(row, lockedRow);
+ this.fireEvent('rowupdated', this, rowIndex, record);