Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 914629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:44:54+00:00 2026-05-15T17:44:54+00:00

Environment: VS2010, SL4, RIA Services I have an SL4 UI that I developed against

  • 0

Environment: VS2010, SL4, RIA Services

I have an SL4 UI that I developed against data objects that were instantiated from an XML file (so that I didn’t have to worry about the back end of the app while I worked on the front end). In this UI, I have a data grid that shows properties for each object in the collection of data. I also have a details panel that shows editable details for the object that is selected in the datagrid.

In this version that uses the “mocked” data, I have the binding for the editable properties set as TwoWay. When I edit a value in the details panel, the corresponding value in the data grid is updated. (I don’t allow editing directly in the grid.) I can move to another record, then return to record I changed and I can see that the value has successfully been changed (on the client side, at least).

I then added RIA Services to the mix so that I am now retrieving the data from the back end. The data loads fine, but when I try to modify the value of a property in the details panel, it doesn’t “stick”. That is, the value in the data grid doesn’t update to reflect the new value and if I move to another record and return to the changed record, the old value is shown.
Since RIA Services is the thing that changed, I’m assuming that that’s where the problem lies.
Next step… I placed a break point in the code generated by RIA Services for client-side consumption inside the setter for the value that I’m changing. When the data is first loaded, the code in the generated setter works fine. When I make a change to the property, however, there appears to be a problem.

Here is the generated code in the setter:

        set 
        { 
            if ((this._quantity != value)) 
            { 
                this.OnQuantityChanging(value); 
                this.RaiseDataMemberChanging("Quantity"); 
                this.ValidateProperty("Quantity", value); 
                this._quantity = value; 
                this.RaiseDataMemberChanged("Quantity"); 
                this.OnQuantityChanged(); 
            } 
        }

After changing the data, I step through the above code in the debugger. When I execute the “RaiseDataMemberChanging…” line, the setter is exited and the rest of the statements are not executed. No exception appears to be thrown and the app continues, but the value isn’t updated because the line of code in the setter that sets actually sets the value doesn’t appear to be executed.

Any ideas on what the problem is (or at least what I should try next)??

Here is some additional information that may be helpful:

The editing happens in a text box in the details panel. Here’s the Xaml for the text box:

<TextBox Grid.Row="2" Grid.Column="0" Text="{Binding Quantity, Mode=TwoWay}" />

Here’s the binding used in the data grid. (I don’t allow editing there. I set IsReadOnly=”True” for the data grid.):

<data:DataGridTextColumn Binding="{Binding Quantity}" Header="Quantity" />

These are both unchanged from when I was binding to the mocked data. The code-behind had to change in order to bind to the different data source. Here’s the binding code from the mocked data version:

        InitializeComponent(); 
        _industrialDetailsView = new PagedCollectionView((IEnumerable)IndustrialDetailsData.DataSource); 
        grid.ItemsSource = _industrialDetailsView;

And here’s the binding code that uses RIA Services. Note that there is an IndustrialDetailsService on the server side from which the IndustrialDetailsContext is generated by RIA Services.

        _industrialDetailsContext = new IndustrialDetailsContext(); 
        _industrialDetailsContext.Load<IndustrialDetailDto>(_industrialDetailsContext.GetByFacilityAndAssessmentYearQuery(202, 2009), 
            loadOperation => 
            { 
                _industrialDetailsView = new PagedCollectionView(loadOperation.Entities); 
                grid.ItemsSource = _industrialDetailsView; 
            }, null);The data context for the details panel has not changed.  It is set from the data grid's SelectionChanged event handler like so:
            IndustrialDetailDto industrialDetails = (IndustrialDetailDto)grid.SelectedItem; 
            DetailsView.DataContext = industrialDetails;

Please let me know if there is other information that would be helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:44:56+00:00Added an answer on May 15, 2026 at 5:44 pm

    I finally determined the nature of the problem when I made the datagrid editable and tried changing the value directly in the datagrid. When I did that, I got an error message saying:

    “This EntitySet of type ‘X’ does not support the ‘Edit’ operation.”

    I was then able to solve the problem by adding placeholder methods to the domain service for “Delete”, “Insert” and “Update” so that the generated EntitySet allows editing.

    Nevertheless, I still think this is a problem that needs to be addressed by Microsoft… I should have received an error message when I tried to modify the text box instead of the generated code simply exiting the setter prematurely.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

weWithin our development environment we have VS2010 installed on my computer along with Expresison
First my environment: I have a TFS2010/VS2010 in a Single Server deployment with AT/DT
I have a multi-threaded Win32 service written in C++ (VS2010) that makes extensive use
I have a dev environment with VS2010 and SP2010 installed in and a production
I'm about to write a Visual Studio Add-In (target environment: VS2010) that should enable
So I have a VS2010 Database Project that I am deploying, with a few
I have a large multithreaded C# program in development that loads multiple DLLs from
We received a VS2010 C# project that calls the function Environment.ExpandEnvironmentVariables(); I understand how
I have a sharepoint workflow that I created in VS2010, and I've deployed it
In our environment, we have 32-bit and 64-bit machines for development. In VS 2010,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.