Sqldatasource updating event
But when I try to Update a data item the Details View is firing it's Item Updating event rather than the event being handled by the sql Data Source.
I need to add a piece of data from the Grid View (the primary key) when the sql Data Source Updating event fires, but that never happens.
I've read several posts on this issue, but haven't found quite the same problem.
Ironically, I'd had two Details Views, one for Add and one for Edit and it works great... My Details View does not have the Key Data Name=Paint Type ID because I'm using the same Details View for adding new records that won't have a unique id yet.
4) Is the updating event formatted correctly as is?
Heres the test page code, which again has that RETURN_VALUE parameter that keeps populating itself based on the sproc: I came across a similar issue and ran the profiler and found that gridview is passing one extra parameter.
for workaround, I just added that parameter in my stored proc and now it works. I added @RETURN_VALUE int as the last param of the sproc, and set it's update Parameter default value to 1 in the Command & Parameter form...
These controls allow page developers to declaratively access and modify data without writing any code to perform the data access. The Data Source Control Basics article that kicked off this article series examined how to add data source controls to a page, specify the data to retrieve and/or modify, and bind that data to a data Web control (such as a Grid View, Details View, or Form View).
This article is one in a series of articles on ASP. While point-and-click data access is useful for prototyping and for beginners or hobbyists who have little to no programming experience, wizards and the like are generally frowned upon by more seasoned developers since they typically offer ease of use at the cost of extensibility and customizability. NET 2.0 data source controls, however, provide the best of both worlds, in my opinion - they can be quickly and easily configured to work with data, yet through a myriad of events that are raised during the data source controls' lifecycles, provide the flexibility for use in more advanced scenarios.