Using 2.6 DEMO, I've tried everything I can think of. Here is what I currently have going on.
Using the WPFToolkit DataGrid, I've set my ItemsSource like so:
EntityCollection<NoiseMeasurementEntity> noise_collection = new EntityCollection<NoiseMeasurementEntity>();
adapter.FetchEntityCollection(noise_collection, null);
noise = new EntityView2<NoiseMeasurementEntity>(noise_collection);
NoiseGrid.ItemsSource = noise;
I was having problems with my real entity creation code, so I made this function triggered by a Button:
private void CreateNoise_Click(object sender, RoutedEventArgs e)
{
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
NoiseMeasurementEntity nm = new NoiseMeasurementEntity();
nm.DataFileName = "eenie";
nm.DataFileIndex = 0;
//set other params too
adapter.SaveEntity(nm);
noise.RelatedCollection.Add(nm);
}
}
After this returns, I do get a new row in the grid, but it only has its PK set. The rest of the fields are blank.
Requerying/Restarts show the values.
I set up another test function to tweak a value of the selected entry, and the databinding works there, the value is updated as expected.
I've tried EntityCollection.AddNew, and ((IBindingList)EntityView2).AddNew.
What am I missing?