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

Password column showing in plain text

3 Answers 531 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 30 Jan 2017, 05:03 PM

I have a kendo grid that contains a ClientDetailTemplateId.  The Client Details grid contains a column in which the data type from the model is set to Datatype.Password.  The grid is also set up for InCell editing.

When the detail grid shown, all values in the Password column are visible in plain text. When I click in the cell, the password is then converted to the typical password field characters to hide the password.  When I click out of the cell, the changes are shown in plain text again.

How can I prevent the password column from showing the passwords in plain text when not in 'edit' mode.  I thought that adding the Datatype attribute to the view model would handle this, but apparently only in edit mode.

Regards,

Shawn

3 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 01 Feb 2017, 03:39 PM
Hi Shawn,

As the Kendo Grid does not offer the possibility to configure a column as s "password", I would suggest you to define a ClientTemplate for the Password field to properly mask its text:
columns.Bound(p => p.Password).ClientTemplate("<span>#: Array(data.Password.length).join('*') #</span>");

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Shawn
Top achievements
Rank 1
answered on 02 Feb 2017, 03:02 PM

Veselin,

Thanks for the answer.  That sorted me out.

Regards,

Shawn

0
arodriguezbr
Top achievements
Rank 1
answered on 10 May 2020, 12:25 AM
thanks man. this trick saved me.
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Shawn
Top achievements
Rank 1
arodriguezbr
Top achievements
Rank 1
Share this question
or