Rowupdating event fires twice
-Frinny Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? Hi all, I seem to be having the same issue but I don't quite follow the trouble with the above post. Can you explain the T/S a little more or maybe point me to another post that may have already covered it? It's quite common that people create the data source and bind this source to the Grid View in their Page_Load() method.I'm facing some annoying Grid View behavior where it fires the Row Deleting event twice.Because it seems that a lot of our recurring issues have to do with conflicting namespace events and it appears there is a mishmosh of using the trigger method as well.In the mean time, if you want to submit a pull request with a temporary solution that better integrates @andrejpavlovic's fix, let me know.
@jeaniec Sorry, this is not completely fixed (even with correcting the typo).
However, now that the event triggering twice is solve. Seconds For what it's worth my solution/dirty hack ' Declare a global boolean Public exit Sub As Boolean = False Sub Dothis Once(blah, blah) If exit Sub = True Then Exit Sub End If ' Do some coding/DB work or something ' code has ran so set boolean to true Here's a link to some information regarding Microsoft's awareness of this bug and a fairly good workaround that doesn't involve hacky flags: View_commands_ _Auto Event Wire Up Thanks for reporting the issue.
But the funny part is (for me) the event turned out to be inconsistance in its behaviour (i.e. And if someone else also facing similiar inconsistance behaviour, I'd advice to do like what I'll hopefully do; which is letting the user select the rows and clicks on a button (outside the grid) to delete them instead of embeded delete button within each row. Seconds Private Function Ok2Delete(By Val p Row As String) As Boolean If Session("Row Index") Is Nothing Or Else _ (CInt(Session("Rowindex")) = p Row And Also Date Time. This is a known issue and we are investigating fixing this in the next service pack.
I'm having a very hard time understand what would prevent your event from being fired.
Do you have some sort of Java Script functionality that may be stopping it? A common problem people have with Grid Views is understanding when to data bind the data source to the Grid View.