5 Answers, 1 is accepted
You may use the PasswordBox control bound to a property of your custom object in your GridViewDataColumn as it is demonstrated in the following forum thread. Then you may easily retrieve the value of this property for further processing.
Thank you!
Vanya Pavlova
the Telerik team
The linked answer donot seem to work anymore since passwordbox is no longer data bound due to security concerns. Is there another work around for this?
Hello Ashley,
To achieve your requirement you can use RadPasswordBox. However, as you already noted, the password cannot be data bound due to security reasons. To sync the Password and SecurePassword properties you will need to write custom logic that gets the properties and saves what is needed in the database and vice versa. One way to do this is shown in the Getting Started article of RadPasswordBox.
Regards,
Martin Ivanov
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Martin,
That was really helpful. I am able to get the password in the code behind. But I have a qn regarding how to get the selected rows' datacontext in the code behind. If It was a textbox I could just bind it as DataMemberBinding ="{Binding Password }"in the xaml but in this case how do i specifically say that I want to update this particular childrow's(selected row's) password in the code behind during the passwordchanged event. I am new to wpf and I am hoping you can help me.
Hello Ashley,
You can use the SelectedItems collection of RadGridView. The collection contains custom business objects from the ItemsSource collection of RadGridView. You can read more about this in the Selection section of the RadGridView documentation.
Regards,
Martin Ivanov
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.