We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cannot change Input type to password in grid column

Hello,

I have a grid with a password field as follows:

<GridColumn Field=@nameof(Store.Password) HeaderText="Password" AutoFit="true" FilterSettings="@ContainsFilter" EditorSettings="PasswordEditParams"></GridColumn>

In EditorSettings I'm setting type to password:

PasswordEditParams = new StringEditCellParams
{
Params = new TextBoxModel() { Type = InputType.Password }
};

However, field content is showing (in grid and in edit dialog) instead of showing asterisks.

Could you please give me advice on how to fix the input type?

Thanks



3 Replies 1 reply marked as answer

KG Keerthana Ganesan Syncfusion Team October 22, 2022 12:29 AM

Hi Erick,

Greetings from Syncfusion support.

Query: Cannot change the input type to password in a grid column.

We have analyzed your query and we made a code example based on your requirement. Kindly refer to the attached code snippet for your reference.

<GridColumn Field=@nameof(Order.ShipName) HeaderText="Ship Name" EditType="EditType.DefaultEdit" Type="ColumnType.String">

                <EditTemplate>

                    <SfTextBox ID="ShipName" Type="InputType.Password"></SfTextBox>

                </EditTemplate>

</GridColumn>


Kindly get back to us if you have any further queries.

Regards,

Keerthana



ER Erick October 23, 2022 01:27 PM

I just added two-way data binding with @bind-Value and it works great.

Thanks,

Erick



Marked as answer

MS Monisha Saravanan Syncfusion Team October 24, 2022 06:10 AM

Hi Erick,


Welcome.


We are glad to hear that your query has been resolved. Kindly get back to us if you have further queries. As always we will be happy to help you.


Regards,

Monisha


Loader.
Live Chat Icon For mobile
Up arrow icon