Update(); The page doesn't error out, but the Update to Order Total in the Orders Db doesn't update. Or, tap into the Updating event, and add the new value to the event argument collection of values. ) - Next project I will follow everyone's suggestion :) Thanks all Using the Default Value property passes this value to the query. I tried that before (see my commented-out code above) but I tried it again: //Update Order Table with Total of Order Sql Data Source2. Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. To String()) "") End Sub Protected Sub Form View1_Item Updating(By Val sender As Object, By Val e As System. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.
I have a Transactions table which stores individual items that the user selects for purchase (item name, item price, order ID, etc) I have an Orders table which stores values for the Order (account name, order total, etc) Here is my Sql Data Source as defined in the page: " Insert Command="INSERT INTO [tbl Orders] ([Order Date], [Order Total], [Order Account], [Order Cost Centre]) VALUES (@Order Date, @Order Total, @Order Account, @Order Cost Centre); SELECT @Order New ID = SCOPE_IDENTITY()" Select Command="SELECT * FROM [tbl Orders]" Update Command="UPDATE [tbl Orders] SET [Order Date] = @Order Date, [Order Total] = @Order Total, [Order Account] = @Order Account, [Order Cost Centre] = @Order Cost Centre WHERE [Order ID] = @original_Order ID AND [Order Date] = @original_Order Date AND [Order Total] = @original_Order Total AND [Order Account] = @original_Order Account AND [Order Cost Centre] = @original_Order Cost Centre" Old Values Parameter Format String="original_" oninserting="Sql Data Source2_Inserting" oninserted="Sql Data Source2_Inserted" onupdated="Sql Data Source2_Updated" onupdating="Sql Data Source2_Updating" //Update Order Table with Total of Order //Sql Data Source2.
I looked at this, but it doesn't really get at what I'm trying to do.
I think because I'm trying to update two tables, and for one table use Insert/Delete commands, and because I need to manipulate the variables taking values from the edited row (to lookup the ), that I really need to override it.
NET Grid has a number of properties for executing client-side events.
See the Client-Side Events tutorial and the Events documentation.