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 7679075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:47:34+00:00 2026-05-31T17:47:34+00:00

When saving a new entity something strange happens… I have a data grid with

  • 0

When saving a new entity something strange happens…
I have a data grid with a list of ‘Depots’ populated using a domain data source.
When the user wants to add a new ‘Depot’ this is what happens:

Depot newDepot = new Depot();
newDepot.Name = "My New Depot";

EditDepot popup = new EditDepot(newDepot); // create the popup and pass the newly created Depot

domainDataSource.DataView.Add(newDepot); // add a new Depot to the datagrid

// handle the popup events
popup.CancelClick += (cancelSender, cancelArgs) =>
{
    if (GridDataSource.DataView.Contains(newDepot))
        domainDataSource.DataView.Remove(newDepot);

    domainDataSource.DomainContext.RejectChanges();
};

popup.Show();

The popup constructor then passes the entity to a viewmodel. The viewmodel constructor then creates a new instance of ‘ContactInfo’, another entity which is linked to ‘Depot’ (Depot.ContactInfo). After filling in a few properties, the ‘Depot’ is assigned to a property in the viewmodel and a dataform is used to edit the data. Once the user is happy with the content they will press save. The Depot is added to the context (Context.Depots.Add….) and then the changes are submitted. (It’s also worth noting I have tried added the ContactInfo item to the context too, with no joy). The data is saved to the database (via WCF) and everything appears to have worked correctly. The proplem is the datagrid is not displaying the ContactInfo fields, where as it did before the save. As the user edits the data, you can see the datagrid populated behind the popup. If the user refreshes, the data returns. This problem does not happen when the entity is editied.
Now, to throw another spanner in the works… This doesn’t happen on all our machines…
We have a build machine and the output does have this problem, however one machine in the building builds a version which does not have this problem! After some investigation, we have found that it appears to be the version of WCF RIA Services. On my machine, I had V1.0 SP1. I Tried V1.0 SP2 and still had the same problem. Now on the machine that works, WCF RIA Services SP1 Beta was installed. After he unistalled this, and installed SP2, the problem occured on his machine.
So, we are relutant to use a beta version in our final release, but unless we can fix this issue we wont have a choice. Does anyone have any ideas? Has anyone seen this issue before?

I have also tried different version of the WCF toolkit with no joy

EDIT: I’ve created a simple project to show you whats happening
The project retrieves a load of entities and tries to add one. You’ll notice the the ‘InnerThing’ properties dissapear.
Link to project

  • 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-31T17:47:36+00:00Added an answer on May 31, 2026 at 5:47 pm

    the issue was that the key property was being set in the insert method in the service.
    it looks like this change was not reflected in the client. Changing other properties in the service after submit other than the key did work however.

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

Sidebar

Related Questions

I am using core data in my iPhone app. I have created a simple
I have a JPA domain entity that I'm updating from user input. Depending on
I'm using the entity framework and I have some properties which are common to
I'm having trouble saving an entity into an SQL Server 2005 database. I'm using
I have view for entering new entity. On that view I have two buttons:
I have a persistent entity that I'm using as a template: Company Locations Departments
I have been using a lot Entity Framework in a MVVM WPF application recently
I'm having trouble saving a new row in the DataGridView back to the database.
My android app project need to add a new function of saving the click
Let me preface by saying that I'm new to ant, and I'm using version

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.