Embedded Formviews

L

Larry R

I have a page that contains a formview (let's say "Order") that
contains another grid/formview (say "OrderDetails").

When I edit the item on the Main Grid, the fvOrder shows up. Since
there are no OrderDetails, I have a button that does this:

Dim fv As FormView = fvOrder.FindControl("fvOrderDetails")
fv.ChangeMode(FormViewMode.Insert)
fv.Visible = True
fv.DataBind()

Now comes the problem. The fvOrderDetails comes back with an error that
says " fvOrder must be in insert mode to insert records"...

So, what am I missing here? The fvOrder and fvOrderDetail are bound to
different ObjectDataSource controls ( I set the fvOrderDetail ODS upon
the selection of the order) .

How do I get the "sub" form (fvORderDetails) to allow inserting?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top