views:

130

answers:

1

I'm using a DetailsView bound to a specific member of a custom business object - so, really, a List with one element. It displays fine and I am not having any problems with the bindings as far as I can tell - example being:

<asp:TemplateField HeaderText="Name">
            <EditItemTemplate>
                <asp:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>' />
            </EditItemTemplate>
        </asp:TemplateField>

(the values of the object as set beforehand appear as they should, and all that good stuff)

The issue appears to be that after I call UpdateItem on my DetailsView, the underlying list's sole element does not change (after I fiddle around and change some of the details, of course).

Is it possible that UpdateItem only updates DataSources? I've rooted around in the documentation and googled a bit - I can't seem to find anything either confirming or denying (or even anyone with this problem).

+2  A: 
  1. Do you get your list from the database?

  2. On your UpdateItem command, do you explicitly update the item and save it in the database (or wherever you store it)?

  3. Do you re-fill the list after the update and rebind the DetailsView?

if you do all of the above (or at least 2 and 3) updating should work just fine

roman m