3.2.0

Cancel Edits Button (Refreshing Grid with Original Data) Does not seem to work.

HI there. I've been working on a simple editable grid. I've got a version working where I've added two buttons to the bottom.
The first button submits all changes that have been made to the server.
The second button is supposed to reset the grid to it's original condition but it isn't working. It looks like the grid does a refresh, but the changes I've made (changing "dog" to "cat", etc) remain visible.

What am I doing wrong?

function resetUpdates() {
if (fieldsToUpdate.length > 0) {
fieldsToUpdate = null;
numFieldsToUpdate = 0;
alert('Your changes have been erased');
obj.clearScrollModel();
obj.clearSelectedModel();
obj.clearSortModel();
obj.clearRowModel();
obj.setRowCount(myCells.length);
obj.setCellText(myCells);
obj.refresh();
}
}
Mark J Rubin
July 12,

This topic is archived.

See also:


Back to support forum