Hi,
I've been experimenting with the GridMassUpdateSample. I've replaced the save button's click handler with the following:
This displays the results of calling ListGrid's getRecord(int recordNum) method before and after calling ListGrid's saveAllEdits() method.
If I edit the first row in the table, for example by changing the country name from "United States" to "United StatesA" and then press the Save button, the popup shows the name "United States" (no A) both before and after the save. If I press the Save button again, it now shows "United StatesA" both before and after the save. Is this behaviour correct?
Thanks,
Andrew
I've been experimenting with the GridMassUpdateSample. I've replaced the save button's click handler with the following:
Code:
saveButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { int i = 0; ListGridRecord record = countryGrid.getRecord(i); String beforeSave = "Before save values for record " + i + ": " + record.getAttributeAsString("countryCode") + ", " + record.getAttributeAsString("countryName") + ", " + record.getAttributeAsBoolean("member_g8") + ", " + record.getAttributeAsString("continent") + ", " + record.getAttributeAsDate("independence") + ", " + record.getAttributeAsInt("population"); countryGrid.saveAllEdits(); ListGridRecord recordAfter = countryGrid.getRecord(i); String afterSave = "After save values for record " + i + ": " + recordAfter.getAttributeAsString("countryCode") + ", " + recordAfter.getAttributeAsString("countryName") + ", " + recordAfter.getAttributeAsBoolean("member_g8") + ", " + recordAfter.getAttributeAsString("continent") + ", " + recordAfter.getAttributeAsDate("independence") + ", " + recordAfter.getAttributeAsInt("population"); SC.say(beforeSave + "<BR>" + afterSave); } }); canvas.addChild(saveButton);
If I edit the first row in the table, for example by changing the country name from "United States" to "United StatesA" and then press the Save button, the popup shows the name "United States" (no A) both before and after the save. If I press the Save button again, it now shows "United StatesA" both before and after the save. Is this behaviour correct?
Thanks,
Andrew
Comment