Hi Isomorphic
I want to capture a key Press event when user type something in list grid editor. In my grid, two columns are editable, I want to capture any key press when user types something in any editable column of that editable row.
I define a textItem and Add it to one column as editorType. Then define addKeyPress handler of that textItem. But this KeyPressHandler not fire when i type on that column.
ListGridField Column1 =new ListGridField("COL1", "Station");
listGridField.setCanEdit(true);
TextItem Column1_EDITOR = new TextItem();
Column1_EDITOR.setCanFocus(true);
Column1.setEditorType(Column1_EDITOR);
Column1_EDITOR.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
System.out.println("KeyPress...."+event.getKeyName());
}
});
Suppose user types W in column1 editor then output should be
"KeyPress....W" and so on
But putting this code in grid and input value (ex-WABC TV) nothing printed in console. where i am expecting 7 line output in console.
Please help how this problem will be solved.?
Is somethig missing here.?
Please help.
I am using
SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)
Mozilla 25.0.1
Chrome Version 35.0.1916.153 m
IE 9
I want to capture a key Press event when user type something in list grid editor. In my grid, two columns are editable, I want to capture any key press when user types something in any editable column of that editable row.
I define a textItem and Add it to one column as editorType. Then define addKeyPress handler of that textItem. But this KeyPressHandler not fire when i type on that column.
ListGridField Column1 =new ListGridField("COL1", "Station");
listGridField.setCanEdit(true);
TextItem Column1_EDITOR = new TextItem();
Column1_EDITOR.setCanFocus(true);
Column1.setEditorType(Column1_EDITOR);
Column1_EDITOR.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
System.out.println("KeyPress...."+event.getKeyName());
}
});
Suppose user types W in column1 editor then output should be
"KeyPress....W" and so on
But putting this code in grid and input value (ex-WABC TV) nothing printed in console. where i am expecting 7 line output in console.
Please help how this problem will be solved.?
Is somethig missing here.?
Please help.
I am using
SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)
Mozilla 25.0.1
Chrome Version 35.0.1916.153 m
IE 9