Hello again,
In my application, I need to validate the row before it's added to the grid and cancel the operation if the row is erroneous. I'm using a simple method:
xamGrid.RowExitingEditMode += (s, e) => { var data = e.Row.Data as AddressBookRecord; if (!e.EditingCanceled && !data.IsOkay()) e.Cancel = true; };
However, sometimes this handler runs before the setter of the field is invoked, thus making the data invalid.
When I try to debug, I see the following line in the output:
System.Windows.Data Error: 40 : BindingExpression path error: 'RowData' property not found on 'object' ''AddressBookRecord' (HashCode=18474007)'. BindingExpression:Path=RowData; DataItem='AddressBookRecord' (HashCode=18474007); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')
I have attached the project where the issue occurs. The steps to reproduce the error are:
1. Click the "Add Contact" button.2. Type a random name, press tab, type a random email, press Enter and see the row created.3. The Output window of Visual Studio will show both setters fire and data being valid.4. Repeat the first two steps once again and see the error and the second setter not firing.
Hi,
Your issue has been resolved by the latest serivce release.
Please let me know if you need further assistance regarding this issue.
Sincerely, Matt Developer Support Engineer
HI AntonK,
I will look into this issue for you.
I sent you an email thru our case management system to discuss your unique situation.
Hello, Matt,
It's been a month since you have acknowledged the bug. Are there any expectations on when it is resolved?
Yes, I reproduced this issue and submitted a developer issue for it.
Hello Matt,
Did you manage to succeed in reproducing the issue?