it tries to write the data back from the controls back to the row we just navigated to, thus setting it’s state to modified
It is actually a lot deeper than this...it can get complicated We have seen this type of behavior before under certain conditions.
- If you have a Trim() on the BO field property
- Using a DateTimePicker, Nulls, and a DateTime Field
- Dealing with masked data
The only way that I am going to be able to help you really get to the bottom of this is for you to create a small scale sample that reproduces the problem...then we can see exactly where the issue lies.
The problem generally has to do with .NET posting a value back through the .NET data binding. We actually had an instance in house the other day where this was happening and it ended up being .NET. But the way we got around it (it was a text box accepting a 2 decimal numeric field) was to assign a BindingFormat (N2 in this case) to the textbox which prevented .NET from updating the value twice. This was ultimately a .NET issue.
But any additional details you can provide would be good...you are chasing your tail in the RefreshControl and OnNavigated events. This logic is not where the issue is...it is actually in the SetValue of the property descriptor through .NET and the actual value getting set.