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

Password is visible in Grid Cell

Hi, I am having a problem with password type cells in databound grid. When I am editing it , it shows ***** and while editing if I click on another window ( Another application window ) the password is now visible in PLAIN text. Is there any way to prevent it. Regards, Bidin

2 Replies

AD Administrator Syncfusion Team September 1, 2005 07:21 PM UTC

We are working on some password problems now. If you can upload a sample project showing the problem or tell us how to see it in one of our samples, we can verify we have it corrected. If you do this, also please mention what version of the library you are using. From your description, I tink you might be able to handle the CurrentCellDrawDisplayText event and make sure that *''s are drawn.
private void gridDataBoundGrid1_DrawCellDisplayText(object sender, GridDrawCellDisplayTextEventArgs e)
{
	if(e.Style.CellType == "OriginalTextBox" && e.Style.PasswordChar == ''*'' && e.DisplayText.Length > 0)
	{
		e.DisplayText = new string(''*'', e.DisplayText.Length);
	}
}


BD Bidin Dinesababu September 1, 2005 08:52 PM UTC

Hi, We are using syncfusion 3.2. We set the password type column style like this this.Model.ColStyles[(int)PermissionGridColumn.Password].CellType = "OriginalTextBox"; this.Model.ColStyles[(int)PermissionGridColumn.Password].MaxLength = MAX_PASSWORD_LENGTH; this.Model.ColStyles[(int)PermissionGridColumn.Password].PasswordChar = ''*''; To reproduce this problem, move your main window to one corner of the screen. THen click on the password type cell and edit it. It then displays ****. Do not click anywhere within your main window. Now click on another application window. THis will expose the text in PLAIN. Now I fixed issue by handling the main window deactivate event and writing Currentcell.EndEdit in the deactivate handler. This is happening with the current cell renderer object while it is being edited. The same problem will occur if you have a button type cell next to password type cell and after editing the password if you click the button on the next cell. Regards, Bidin

Loader.
Live Chat Icon For mobile
Up arrow icon