This is a migrated thread and some comments may be shown as answers.

UpdateValues fails to update Sub Object properties...

1 Answer 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 28 Nov 2011, 08:06 PM

I have a grid bound to a an object which has a sub-object with additional details. I use . (dot) notation to bind columns to the sub-object. The data source is using NeedsDataSource and is coming from an entity framework DBContext.

I handle the UpdateCommand and use UpdateValues to update my primary object.
It displays fine, but when I edit the row, only the primary object properties are updated. Sub object properties are not changed.

If I use OwnerTableView.ExtractValuesFromItem, I can see all the modified values for the subobject, in the property dot notation.

Should this work? Should UpdateValues() properlly handle sub-object properties? Or for each grid do I need to manually assign the values from the ExtractValuesHash to the subobject?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Nov 2011, 05:21 AM
Hello Jonathan,

The new values which the user entered before triggering the Update command can be fetched calling the ExtractValuesFromItem method. Check the following help documentation which explains the same.
Retrieving Original Values for Edited Item

-Shinu.
Tags
Grid
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or