How to show password text as '*' in grid Client Detail Templates and Editor Templates.
1 Answer, 1 is accepted
0
Alexander
Telerik team
answered on 10 Jul 2023, 06:44 AM
Hi Weijun,
Thank you for reaching out.
Generally, you can achieve the desired outcome by using the built-in templating abilities of the Telerik UI for ASP.NET Core Grid in order to sculpt the textual representation for a given field into '*' characters.
To be more precise, you can achieve the desired outcome by:
Creating a common function that will be responsible for altering each of the characters for a given string argument:
Utilize the Columns.Bound.ClientTemplate() API configuration of the Grid and utilize the conventional hash Syntax that is accustomed for the Kendo Templating mechanism. It is important to notice, that for the Detail template, the "#" symbol needs to be escaped:
You can even use a combination of the following knowledge base article for the editor to toggle between a non-hidden and a hidden state for the password: