[no subject]
Hello,
I have a grid where a new is added dynamicaly when a user presses the "key down" key.
This works fine. When you keep the "key down" key pressed, new rows are added on the fly. There's only one bug. The cells are editable.
When you enter text in a cell from the last row and you press the "enter" key or the "key right" key, or another key and then the "key down" key, there is no problem. The new row will be added and you can continue working.
But when you enter text in a cell from the last row and press the "key down" key imediately, a new row will be added, but then the complete grid crashes.
obj.onKeyDown = function(){
if(obj.getCurrentRow() == (obj.getRowCount()-1)){
obj.addRow();
}
}
Has anybody any idea how to solve this?
Is there a way I can let the grid think I pressed the "enter" key for example?
e.g. : the "key down" key is pressed, then through javascript I let the grid think the "enter" key was pressed as well before the obj.addRow() command is executed.
Thanks!!
I have a grid where a new is added dynamicaly when a user presses the "key down" key.
This works fine. When you keep the "key down" key pressed, new rows are added on the fly. There's only one bug. The cells are editable.
When you enter text in a cell from the last row and you press the "enter" key or the "key right" key, or another key and then the "key down" key, there is no problem. The new row will be added and you can continue working.
But when you enter text in a cell from the last row and press the "key down" key imediately, a new row will be added, but then the complete grid crashes.
obj.onKeyDown = function(){
if(obj.getCurrentRow() == (obj.getRowCount()-1)){
obj.addRow();
}
}
Has anybody any idea how to solve this?
Is there a way I can let the grid think I pressed the "enter" key for example?
e.g. : the "key down" key is pressed, then through javascript I let the grid think the "enter" key was pressed as well before the obj.addRow() command is executed.
Thanks!!
Kurt
April 25,