Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > formview, objectdatasource, update method

Thread Tools

formview, objectdatasource, update method

Posts: n/a
I have an business object bound to a formview with through an object
datasource, in edit mode when i click update i receive the following

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

This is correct as the actionid property is readonly (being the primary

I've been trying to find out how to tell the objectdatasource that this
is readonly, im not reading the actionid out to the form as its not
required to be viewable.

I tried putting <DataObjectFieldAttribute(True, True, False)> before
the property as suggested in another thread like so:

''' <summary>
''' Property to get the id of the event
''' </summary>
''' <value></value>
''' <returns>The event id</returns>
''' <remarks>DataObjectFieldAttribute is added to let the
objectdatasource control know
''' that this property is the primary key and as such,
<DataObjectFieldAttribute(True, True, False)> _
ReadOnly Property ActionID() As Integer
Return _autoBean.GetValue("ActionID")
End Get
End Property

This has made no difference though, i still receive the above error.

Any ideas on how to stop it from tryign to update the actionid?



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update On The Windows Phone 7 Update Update Lawrence D'Oliveiro NZ Computing 2 02-25-2011 08:03 AM
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
ObjectDataSource & FormView adding two extra paramaters to Update method giving error non-generic method ... Fred Dag ASP .Net 0 09-18-2006 10:36 PM
[ question] how to apply online update function into program (the effect just like Norton system work live update) chan ASP .Net 1 03-04-2004 02:58 PM
Datalist: update a datasource without using select/edit/update Hartmut Schroth ASP .Net 3 12-01-2003 09:54 AM