I have a GridView and provide the user with sorting, paging, editing, deleting and selecting functionality.
When the user klicks the delete-button in the GridView, the Row-Deleting event is triggered, the record is correctly deleted from Database after user confirmation. Then the Row-Deleted event is triggered and afterwards the Row-Deleting event is triggered AGAIN, resulting in a second user confirmation and a Delete-instruction running into void if the user confirm again the question.
Between the Row-Deleted event and the second Row-Deleting event I saw the GridView binds his data again (comprehensible because it wants to provide an updated view to the data), maybe somwhow there is generated or provoced the second Row-Deleting event.
<%--<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Data Source=DGUI415372\SQLEXPRESS;Initial Catalog=Rechnung;Integrated Security=True"
DeleteCommand="Delete FROM dbo.Rechnung WHERE RechnungsNr = @RechnungsNr"
SelectCommand="SELECT Rech.RechnungsNr, Rech.KNR, Rech.NA, Rech.NB, Rech.NT_ID, Anr.NT
View Complete Post