CountryRecord countryRecord = (CountryRecord) record;
return countryRecord.getGdp() / countryRecord.getPopulation();
}
});
countryGrid.addEditorExitHandler(new EditorExitHandler() {
public void onEditorExit(EditorExitEvent event) {
String fieldName = countryGrid.getFieldName(event.getColNum());
if("gdp".equals(fieldName) || "population".equals(fieldName)) {
int gdpFieldNum = countryGrid.getFieldNum("gdp_percap");
countryGrid.refreshCell(event.getRowNum(), gdpFieldNum, false, true);