I have successfully managed to implement a "bindable" PasswordBox in WPF (http://www.wpftutorial.net/PasswordBox.html), and used it in a WPF DataGrid.
I really need this feature in the XamDataGrid as well.
I have found several posts which mentions the XamMaskedEditor (without providing any code). These posts are fairly old, and I was wondering if you had implemented such a feature in the current release of NetAdvantage?
Hello Andrew,
I've tried the sample you provided and it works just fine.
I don't know if the xamDataGrid is capable of this, but is it possible to use some kind of display mode/edit mode to imitate the "normal" XamTextEditor used in the grid?
I'm not sure what updates you are referring to. As I mentioned the only remaining issue was with your PwdHelper. If you step through your code you will see that the OnBindingChanged is invoked before the OnBindChanged and only the OnBindingChanged actually sets the Password of the PasswordBox - the OnBindChanged does not. So perhaps you should modify your code to set the Password in the OnBindChanged as well. I've attached a modified version of your sample that has all of the changes mentioned in this thread.
Any updates to this issue?
It is quite important that I use the XamDataGrid in my application instead of the native WPF DataGrid...
Hello again,
Looks like it's my PasswordBox that causes the problems...
Would it be possible to use a "standard WPF" PasswordBox? Maybe this would solve the problem with the binding.
The last part of my answer was simply that there seems to be an issue with your PwdHelper. It assumes that the Bind property is set before the Binding property but when I ran your sample that was not the case. When I ran the sample (after adding the ThemeInfo attribute and after changing the UnboundField to a Field) it still didn't work because the Binding property was set first (i.e your property change callback for the Binding property was executed) but since Bind was false it didn't actually push the value into the PasswordBox. Then when the Bind property was set and its property change callback was executed it doesn't try to push the value into the PasswordBox. I can't modify/debug your helper code. You would likely need to refactor the Binding and Bind property change handlers to both go through a common routine and push the value into the PasswordBox when the Bind is true and the Binding is set.