Telerik RadGrid opens an additional form for editing pop-ups by pressing "enter" from a pop-up form to insert

I have a radgrid that uses popup edit mode with a custom editing template. When you press the enter key, the edit form inserts a new element into the grid. I enter and add an item. This successfully inserts. Then I move on to adding a second element: a pop-up form appears. I enter my data and press enter to insert the item. This time, instead of inserting an element, my edit form will clear the entered data and open another pop-up edit form to allow editing of my previously inserted element (the first time). Now I have 2 pop-ups (1 for insertion, 1 for update).

If I press the insert button instead of pressing enter, then everything will work fine. From what I can guess, this is what I think I press the enter button in the selected row on the grid. How can I prevent the edit event from triggering at boot time?

thanks

+3
source share
1 answer

Try adding a panel to the editing template and set the DefaultButton to the "Insert" button.

<asp:Panel ID="pnlEditor" runat="server" DefaultButton="btnUpdateItem">
+1
source

Source: https://habr.com/ru/post/1705364/


All Articles