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

Enter key deletes row in grid

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kristin Echols
Top achievements
Rank 1
Kristin Echols asked on 08 Sep 2010, 08:08 PM
I have a grid with update and delete buttons.  Above the grid, I have a form for adding and updating the grid items with a save (submit)button.  If there are no items in the grid and the user presses the Enter key, the item in the form is added to the grid.  Once there are items in the grid, when the user presses the Enter key the first itme in the grid is deleted.  Any ideas why this would happen?  I have tried setting the grid's ClientSettings.KeyboardNavigationSettings.EnableKeyboardShortcuts to false but that did not change the behavior.

Thanks -- Kristin

1 Answer, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 10 Sep 2010, 03:15 PM
Hello Kristin,

The cause of the described behavior is that when you have multiple buttons in a form the first one rendered is set as DefaultButton and its events are fired when you press Enter.

To implement the desired functionality, please set the Update button as DefaultButton of the form.

Greetings,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Kristin Echols
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or