This is a migrated thread and some comments may be shown as answers.

Create passwordBox inside Radgridview

5 Answers 237 Views
GridView
This is a migrated thread and some comments may be shown as answers.
sivakanth
Top achievements
Rank 1
sivakanth asked on 22 Dec 2010, 12:20 PM
hi,
          I want to create password box inside rad grid view.it will display value from database to rad grid.also add grid to database.
that is two way binding.pls attach sample code. i already waste more time for searching.

5 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 22 Dec 2010, 12:57 PM
Hi Sivakanth,

 
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!

Best wishes,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Ashley
Top achievements
Rank 1
answered on 18 May 2020, 06:22 PM

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?

 

0
Martin Ivanov
Telerik team
answered on 21 May 2020, 09:52 AM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ashley
Top achievements
Rank 1
answered on 07 Jun 2020, 05:51 PM

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. 

 

0
Martin Ivanov
Telerik team
answered on 09 Jun 2020, 03:55 PM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
GridView
Asked by
sivakanth
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Ashley
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or