PDA

View Full Version : CellEditor in EditorGrid lose content when you scroll the grid



spb
3 Aug 2017, 1:43 AM
Hi,

if i scroll my livegrid and have an editor in, the entered value will be not comited in the store.

This two listener have no value found in the editor field.

grid.getEditor(quantity).addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
GWT.log("blur");
grid.getEditor(quantity).finishEditing();
}
});


grid.getEditableGrid().addDomHandler(new ScrollHandler() {

@Override
public void onScroll(ScrollEvent event) {
GWT.log("Scroll " + grid.getEditor(quantity).getValue());
grid.getEditor(quantity).finishEditing();
}
}, ScrollEvent.getType());

spb
3 Aug 2017, 2:04 AM
Solution:

Overwrite "onScroll" in class "GridInlineEditing":
final GridInlineEditing<ArticleDataImpl> stepOnEnterGridInlineEditing = new GridInlineEditing<ArticleDataImpl>(view){
protected void onScroll(ScrollEvent event) {
getEditor(quantity).finishEditing();
super.onScroll(event);
}
};