I have a RadGrid and am using an EditForm for Inserting/Updating. The edit form type is a popup. In the EditForm, I call the ItemCommand code behind function this way:
<telerik:RadButton CommandName="PerformInsert" ID="rbAddSubscription" runat="server" Text="<%$ Resources: global, string_addSubscription%>" OnClientClicking="btnAddSubscription"></telerik:RadButton>
It works fine. The row gets added to the DB, I rebind the grid, and all is well. But if I then refresh the browser page, the ItemCommand code behind function runs, and inserts the row again. The edit popup is closed. If I debug the ItemCommand during the page refresh, the CommandName is "PerformInsert". I've tried to clear the edit indexes, setting e.canceled = true, etc., but it stays the same. The popup form is not longer open, which is right. The the CommandName were no longer "PerformInsert", my problem would go away, as I'm checking for that in the ItemCommand.
Any insight would be very much appreciated.
<telerik:RadButton CommandName="PerformInsert" ID="rbAddSubscription" runat="server" Text="<%$ Resources: global, string_addSubscription%>" OnClientClicking="btnAddSubscription"></telerik:RadButton>
It works fine. The row gets added to the DB, I rebind the grid, and all is well. But if I then refresh the browser page, the ItemCommand code behind function runs, and inserts the row again. The edit popup is closed. If I debug the ItemCommand during the page refresh, the CommandName is "PerformInsert". I've tried to clear the edit indexes, setting e.canceled = true, etc., but it stays the same. The popup form is not longer open, which is right. The the CommandName were no longer "PerformInsert", my problem would go away, as I'm checking for that in the ItemCommand.
Any insight would be very much appreciated.