Make column password hidden with eye symbol

Hello,

I would like to mark a field as type password so it shows the *** with an eye symbol in my grid. When I edit in the dialog I want this functionality.

Image_6794_1740754773885


Greetings,

Stefan Habets


Attachment: webusers_a218afc4.zip

3 Replies 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team March 3, 2025 09:37 AM UTC

Hi Stefan,


Greetings from Syncfusion support


Based on your query, it seems that you want to display the Password column value as a password type in edit mode instead of showing its actual value. This can be achieved using the Grid's edit parameters feature. The default TextBox component in the Grid's edit form can be customized using its properties, and the editor component's behavior can be adjusted through the columns->edit->params property.


For your convenience, a sample has been provided where the TextBox component's type is set to "password" using the edit parameters feature. Please refer to the code example and sample below for more details.


App.component.ts

 

public passwordparams: any;

 

public ngOnInit(): void {

        this.data = orderDetails;

        this.passwordparams = {params: {type: 'password'}};

    }

 

App.component.html

 

<ejs-grid #grid id='Grid' [dataSource]='data' [editSettings]='editSettings' [toolbar]='toolbar'>

        <e-columns>

            .  .  .  .  .  .  .  .  .  .

            .  .  .  .  .  .  .  .  .  .            

            <e-column field='CustomerName' headerText='Customer Name' [edit]='passwordparams' width='120' ></e-column>

            .  .  .  .  .  .  .  .  .  .

            .  .  .  .  .  .  .  .  .  .

        </e-columns>

    </ejs-grid>

 

 


Sample: https://stackblitz.com/edit/angular-pmbbeqjt-4vkulbuc?file=src%2Fapp.component.ts,src%2Fapp.component.html


Documentation: https://ej2.syncfusion.com/angular/documentation/grid/editing/edit-types#customize-textbox-component-of-stringedit-type


Screenshot:



Regards,

Rajapandi R


Marked as answer

SH Stefan Habets March 4, 2025 07:42 AM UTC

Thank you Rajapandi, this works for me



RR Rajapandi Ravi Syncfusion Team March 5, 2025 04:51 AM UTC

Stefan,


We are happy to hear that the provided solution was helpful.


Please get back to us if you need any other assistance.


Loader.
Up arrow icon