locked
How do I update/insert data in a multiview which is nested in a FormView? RRS feed

  • Question

  • User1471469962 posted

    Hello,

    I use a multiview inside a formview to simulate tabs. The formview is bound to a datatable via a data table adapter ObjectDataSource1. Everything works fine if I just use the formview. Suppose I have a column X in the datatable A. If I want to edit the value of X in the formview for a particular record, all I have to do is bind its textbox in EditItemTemplate to X, i.e. set its SelectedValue property to SelectedValue='<%# Bind("X") %>'. However, It doesn't seem to work if I have a nested multiview inside the formview. When I hit update, the page flashes but the data doesn't really change. I guess it is because the code does not specify which data table (or in my case, adapter) column X is in. So What should I write in the SelectedValue property to tell the machine that the adapter bound to the form view is the one you are looking for?

    Thanks!

     

    Tuesday, June 10, 2008 2:18 PM

Answers

  • User-1635004338 posted

    Hi webberman,

    You have nested multiview in FormView, so i think you have to do something in ItemUpdating event manually to update the data.

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 13, 2008 3:55 AM

All replies

  • User1471469962 posted

     Any Help?

    Wednesday, June 11, 2008 8:06 AM
  • User1471469962 posted

    I found that I could still retrieve the data from the data table, i.e. <%# Eval("X") %> still works. But I am not able to update the table. If the code <%# Bind("X") %> is not correct for a control inside a multiview which is nested in a formview, how could it still get the data but not updata it? Please help!! 

    Wednesday, June 11, 2008 10:11 AM
  • User-1635004338 posted

    Hi webberman,

    You have nested multiview in FormView, so i think you have to do something in ItemUpdating event manually to update the data.

    Thanks,

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 13, 2008 3:55 AM