Thursday, October 2, 2014

Re: Using datagrid.redrawRow after failed cell validation

Don't you want to clearViewData() in the catch block so you clear the pending change if the parser throws an exception? e.g.

@Override
public void update(final int index, R item, String value) {
try {
double doubleValue = 0.0;
if (value != null && !value.isEmpty()) {
doubleValue = MyFormat.PARSER.parse(value);
}
item.setAmt(doubleValue);
} catch(Exception e) {
                // parser does not like value, so reset pending change
thisCell.clearViewData(item);
}
grid.redrawRow(index);
});


-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment