GridView update with ObjectDataSource

Discussion in 'ASP .Net' started by Danny W, Sep 8, 2005.

  1. Danny W

    Danny W Guest

    Hi all,

    I'm trying to update a record using ObjectDataSource but got the following
    error:

    The 'PhotoCount' property on the type specified by the DataObjectTypeName
    property in ObjectDataSource 'odsAlbums' is readonly and its value cannot be
    set.

    PhotoCount is a readonly property in my object and I've already set it to be
    readonly in the gridview. Surely GridView or ObjectDataSource is smart
    enought not to update a readonly property?? Or do I have to do this by code?

    Cheers,

    Danny
    Danny W, Sep 8, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raja
    Replies:
    1
    Views:
    3,324
    PeterKellner
    Jun 7, 2006
  2. Olivier Matrot
    Replies:
    2
    Views:
    3,290
    Walter Wang [MSFT]
    Oct 2, 2006
  3. Replies:
    6
    Views:
    434
  4. Steve Kershaw

    GridView update using ObjectDataSource

    Steve Kershaw, Sep 11, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    479
    David Wier
    Sep 11, 2007
  5. Chris Szabo

    GridView, ObjectDataSource, Update problems.

    Chris Szabo, Jul 14, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    315
    objectdatasource control update
    Jul 25, 2006
Loading...

Share This Page