This content has been marked as final. Show 4 replies
OK, I got the answer by myself, by manually dispatching the itemEditBeginning event.
I am trying to accomplish the same and curious how you did it. Do I need to create my own data grid class (derived from DataGrid) and then need to fire the itemEditBeginning event? Appreciate if you can post sample code.
Not tried with tree but with DG you can call editedItemPosition().
Thanks Tracy. That helped. Now I am able to enable item editor for the first cell of a new row in the grid when the "add new" button is clicked.
However I ran into another issue. I am also trying to add a new row to the Grid and enable item editor for the first cell of the new row, if the user tabs out of the last cell of the previous row. I am calling the editedItemPosition() in DataGridEventReason.NEW_ROW and also DataGridEventReason.OTHER in the itemEditEnd handler for the Grid, but it is not working. When I tab out of the last filled row of the Grid, focus is going out of the Grid and to the address bar of the browser and when I tab again it comes to the last cell of the last row and then the next tab is taking me to the first cell of the new row and then item editor gets activated this time. Not sure what I am missing. Appreciate if you can let me know what I am missing here.
Attached the code.