Insert in detailsview based on a gridview selectedvalue
- From: "et" <eagletender2001@xxxxxxxxx>
- Date: Fri, 26 Jan 2007 18:40:32 -0700
I have a detailsview that is populated according to the item selected in a
gridview. This works fine for updating the detailsview, but when I need to
add a record in the detailsview, it loses the connection, and the record is
saved with no related field id. For instance, the gridview contains a list
of orders. User selects on an item in the gridview, and the details view is
pouplated with all the products ordered according to the order selected,
something like "select * from ClientOrderDetails where ClientOrderID = @ID"
When I update a record, this is fine, as it modifies the record according to
the @ID, but when I attempt to insert a record, keeping the ClientOrderID =
@ID, it tells me there is no @ID parameter. How can I maintain this field
when inserting, or is there another way to grab that ID?
.
- Prev by Date: changing styles of gridview
- Next by Date: Re: Command Button to Open Window
- Previous by thread: changing styles of gridview
- Next by thread: How can I access a calendar control inside a detailsview control?
- Index(es):
Loading