D
Doug Kent
When my FormView uses its ObjectDataSource to save changes, in the FormView's
ItemUpdating handler, the FormViewUpdateEventArgs OldValues and NewValues
collections are both completely empty.
The FormView is bound to an ObjectDataSource. The
ObjectDataSource has DataObjectTypeName, OldValuesParameterFormatString
and ConflictDetection set as shown below:
<asp:ObjectDataSource ID="ListingsDataSource" runat="server"
TypeName="Listing"
SelectMethod="GetListingWithAgent"
UpdateMethod="Update"
DataObjectTypeName ="Listing"
OldValuesParameterFormatString ="oldEntity"
ConflictDetection ="CompareAllValues"<selectparameters>
<asp:QueryStringParameter QueryStringField="lid"
Type="Int32" Direction="Input" Name="Listing_ID" />
<asp:QueryStringParameter QueryStringField="ts"
Type="String" Direction="Input" Name="timeStampEncoded" />
</selectparameters>
</asp:ObjectDataSource>
The FormView DefaultMode is "Edit", the bound controls in the EditTemplate
are populated by the FormView no problem (using "Bind"). No problem with
selecting.
The FormView looks like this:
<asp:FormView ID="ListingFormView" runat="server"
DataSourceID="ListingsDataSource"
DataKeyNames="ID,Timestamp"
DefaultMode="Edit"
AllowPaging="false">
Anyone have a clue what could be causing this behavior? Thanks!
ItemUpdating handler, the FormViewUpdateEventArgs OldValues and NewValues
collections are both completely empty.
The FormView is bound to an ObjectDataSource. The
ObjectDataSource has DataObjectTypeName, OldValuesParameterFormatString
and ConflictDetection set as shown below:
<asp:ObjectDataSource ID="ListingsDataSource" runat="server"
TypeName="Listing"
SelectMethod="GetListingWithAgent"
UpdateMethod="Update"
DataObjectTypeName ="Listing"
OldValuesParameterFormatString ="oldEntity"
ConflictDetection ="CompareAllValues"<selectparameters>
<asp:QueryStringParameter QueryStringField="lid"
Type="Int32" Direction="Input" Name="Listing_ID" />
<asp:QueryStringParameter QueryStringField="ts"
Type="String" Direction="Input" Name="timeStampEncoded" />
</selectparameters>
</asp:ObjectDataSource>
The FormView DefaultMode is "Edit", the bound controls in the EditTemplate
are populated by the FormView no problem (using "Bind"). No problem with
selecting.
The FormView looks like this:
<asp:FormView ID="ListingFormView" runat="server"
DataSourceID="ListingsDataSource"
DataKeyNames="ID,Timestamp"
DefaultMode="Edit"
AllowPaging="false">
Anyone have a clue what could be causing this behavior? Thanks!