Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1470
IsSynchronizedWithCurrentItem & AddNew
posted

Hi there

I got a problem with the attached sample. I use the grid for some kind of a master/detail view. And for this set the property IsSynchronizedWithCurrentItem to 'true' and bind the detail controls with the "/" operator to the actual position. Everything is working as expected.

But when the AddNewRecord gets focused, the detail controls get emptied and if the user puts any value in those, this values will be lost after the grid synchronizes to an actual position.

So i made a converter, which can disable the controls, when the AddNewRow of the grid is focused. (Actually, it just return false/true, when the databound value is null--> DataBinding is not 'correct'.) I see this more as a workaround.. But, when i add an item to the bound list from code behind, the converter is not really doing what it was created for, because the detail-controls which has null in the bound properties, only getting enabled, when the user puts something in the corresponding grid cells.)

So, is there any good solution to this scenario? Or is it just impossible to have it like this?

Kind regards

Wpf_CurrentItem_Test01.zip
Parents Reply Children