How I can see in the showcase
Grids->Editing->Custom Cell Editors most of the editors accept the key press enter to end the editing for the edited row.
In my application I have implemented a custom SpinnerItem for input double values. After I updated from smartGWT 2.4 to version 4.0 the end edit by pressing enter will no longer work for the SpinnerItem.
I adapted the showcase sample to provide you a running sample to reproduce the behavior. (see attachment)
What is the best way to achieve the desired behavior?
In the sample my first try worked with:
spinnerItem.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
if(event.getKeyName().equalsIgnoreCase("enter")){
countryGrid.endEditing();
}
}
});
But in my own application the ListGrid instance is not available. And I dont want to pass the reference.
I also tried event.getItem().getContainerWidget() to get the ListGrid, but I dont get the ListGrid.
What would be the best way to handle this? Why does enter no longer end the editing for the listgrid? (Maybe a bug?)
For the sample I used:
SmartgGWT 4.0 (downloaded from the nightly build section)
Development Console: SmartClient Version: v9.0_2013-07-03/LGPL Development Only (built 2013-07-03)
Testet in IE10 and FF17
Grids->Editing->Custom Cell Editors most of the editors accept the key press enter to end the editing for the edited row.
In my application I have implemented a custom SpinnerItem for input double values. After I updated from smartGWT 2.4 to version 4.0 the end edit by pressing enter will no longer work for the SpinnerItem.
I adapted the showcase sample to provide you a running sample to reproduce the behavior. (see attachment)
What is the best way to achieve the desired behavior?
In the sample my first try worked with:
spinnerItem.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
if(event.getKeyName().equalsIgnoreCase("enter")){
countryGrid.endEditing();
}
}
});
But in my own application the ListGrid instance is not available. And I dont want to pass the reference.
I also tried event.getItem().getContainerWidget() to get the ListGrid, but I dont get the ListGrid.
What would be the best way to handle this? Why does enter no longer end the editing for the listgrid? (Maybe a bug?)
For the sample I used:
SmartgGWT 4.0 (downloaded from the nightly build section)
Development Console: SmartClient Version: v9.0_2013-07-03/LGPL Development Only (built 2013-07-03)
Testet in IE10 and FF17