This is a migrated thread and some comments may be shown as answers.

New row on tab out in Grid

2 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raja
Top achievements
Rank 1
Raja asked on 17 Jul 2014, 03:04 AM
Hi,

I am looking to create a new row in the grid on tab out from another control. I have two scenarios.

1. Creating a new first row in the grid when user tabs out from a control outside the grid.
     I am able to achieve this by using addRow on tab out of the last control on the form before the grid. But when there is already a row in the grid I am trying to create this row at the bottom rather than at the top. For this as suggested in other post on this forum I am using $(".k-grid-edit-row").appendTo("#components tbody"); But with this text box in the newely created row is not in focus by default. How can i achieve this?

2. Creating a row once the user tabs out from last control of a grid row.
    As of now I don't have success in attaching event to the control in the grid. I tried doing this using "attributes" of the column but no luck.

Please help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 18 Jul 2014, 03:37 PM
Hi Raja,


I am afraid that this scenario is not supported out of the box. Adding the new row at the bottom however, could be done by setting the Grid's editable.createAt option to "bottom". Implementing the other part would require a custom solution that detects the focus and blur events of the Grid and other controls and correctly predict the user's intent. For example you could use the Grid's edit event to attach a blur event handler to the widget used in the last column of the row.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Raja
Top achievements
Rank 1
answered on 24 Jul 2014, 09:30 PM
Thanks Alexander. This one helped.
Tags
Grid
Asked by
Raja
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Raja
Top achievements
Rank 1
Share this question
or