sthamman
3 Mar 2011, 5:47 PM
This issue is there in all versions of GXT.
The below code from GridView should use c.name instead of c.id as the record (r) will not contain data with key c.id when ColumnConfig.setDataIndex() is used.
if (showInvalidCells && r != null && !r.isValid(c.id)) {
buf.append(" x-grid3-invalid-cell");
}
if (showDirtyCells && r != null && r.getChanges().containsKey(c.id)) {
buf.append(" x-grid3-dirty-cell");
}
protected List<ColumnData> getColumnData() {
int colCount = cm.getColumnCount();
List<ColumnData> cs = new ArrayList<ColumnData>();
for (int i = 0; i < colCount; i++) {
String name = cm.getDataIndex(i);
ColumnData data = new ColumnData();
data.name = name == null ? cm.getColumnId(i) : name;
data.renderer = cm.getRenderer(i);
data.id = cm.getColumnId(i);
data.style = getColumnStyle(i, false);
cs.add(data);
}
return cs;
}
The below code from GridView should use c.name instead of c.id as the record (r) will not contain data with key c.id when ColumnConfig.setDataIndex() is used.
if (showInvalidCells && r != null && !r.isValid(c.id)) {
buf.append(" x-grid3-invalid-cell");
}
if (showDirtyCells && r != null && r.getChanges().containsKey(c.id)) {
buf.append(" x-grid3-dirty-cell");
}
protected List<ColumnData> getColumnData() {
int colCount = cm.getColumnCount();
List<ColumnData> cs = new ArrayList<ColumnData>();
for (int i = 0; i < colCount; i++) {
String name = cm.getDataIndex(i);
ColumnData data = new ColumnData();
data.name = name == null ? cm.getColumnId(i) : name;
data.renderer = cm.getRenderer(i);
data.id = cm.getColumnId(i);
data.style = getColumnStyle(i, false);
cs.add(data);
}
return cs;
}