Rowdeleted and rowupdating

You can also indicate whether the exception was handled in the event-handling method by setting the On Row Updated Row Canceling Edit On Row Canceling Edit Row Deleted On Row Deleted Row Deleting On Row Deleting Row Editing On Row Editing Row Updating On Row Updating Grid View Class System. I have a simple Grid View binding to a table in my database.NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements. Auto Generate Columns="False" Width="100%" Key Field Name="ID" On Row Deleted="gv_Row Deleted" On Row Deleting="gv_Row Deleting" On Row Updated="gv_Row Updated" On Row Updating="gv_Row Updating" On Cell Editor Initialize="gv_Cell Editor Initialize" On Custom Button Callback="gv_Custom Button Callback" On Command Button Initialize="gv_Command Button Initialize" On Custom Button Initialize="gv_Custom Button Initialize" On Custom Group Display Text="gv_Custom Group Display Text"-----CODE BEHIND----- using System; using System. ASPx Classes; using Data Prop DAL; using Dev Express. Please refer to the Dev Website Terms of Use for more information. Row Added Event Args e) void wdg1_Rows Deleting(object sender, Infragistics. Row Deleting Event Args e) void wdg1_Row Deleted(object sender, Infragistics.

Must be non-negative and less than the size of the collection." After analyzing the output of my debugging I realized that my Grid View had 0 rows in my row Deleting and row Updating methods.This is the code in one of the methods: My first guess here is that you are changing the view of the page when you enter this event called gv Termene_Row Deleting. If it is, then you're probably losing the locally stored data that you pulled in from the initial SELECT statement you have placed somewhere else.I believe your best bet is to try to fit the statement that gives you gv Termene somewhere into your page_Load event.Hey Glonet, Apparently you don't have the procedure (gdv Aanvraag_Row Deleted) in the codebehind page. Row Deleted End Sub Private Sub gdv Aanvraag_Row Updated(By Val sender As Object, By Val e As System. I'm just wondering if the codebehind is not wired up properly or, if it's a website project, the codebehind declaration was used instead of the codefile (codebehind is web application project, codefile is website project). You should declare a sub gdv Aanvraag_Row Deleted() to catch the event and carry out some code. Private Sub gdv Aanvraag_Row Deleted(By Val sender As Object, By Val e As System. " Delete Command="DELETE FROM [tblaanvragen] WHERE [id] = @id" Insert Command="INSERT INTO [tblaanvragen] ([gebruiker], [begindatum], [einddatum], [aantal], [aanvraag]) VALUES (@gebruiker, @begindatum, @einddatum, @aantal, @aanvraag)" Select Command="SELECT [id], [gebruiker], [begindatum], [einddatum], [aantal], [aanvraag] FROM [tblaanvragen]" Update Command="UPDATE [tblaanvragen] SET [gebruiker] = @gebruiker, [begindatum] = @begindatum, [einddatum] = @einddatum, [aantal] = @aantal, [aanvraag] = @aanvraag WHERE [id] = @id" On Inserted="Sql Data Source1_Inserted"Imports System.

Leave a Reply