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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PasswordChar Property of Text in a DataGrid

Thread ID:





1526 Nov 8,2002 04:44 AM UTC Nov 8,2002 08:13 AM UTC WinForms 1
Tags: GridControl
Escape Boy
Asked On November 8, 2002 04:44 AM UTC

Hi to everyone... I'm just been battered by this situation. The case goes like this.. I have set a Bound DataGrid Table for System Access. But then as I display the Records, namely, {Name, Password, DateAccessed..}, the datagrid reflects the actual string password value of the Password field which should be in a passwordchar mode. It should be hidden in a Passwordchar Property of a text Object right? Is there any possible solution on how to use and trigger the PasswordChar Property of a certain field to a Datagrid... Thanks for reading.. I hope to receive any Reply from you people...

Administrator [Syncfusion]
Replied On November 8, 2002 08:13 AM UTC

Essential Grid does not use the TextBox control as the basis for its TextBox cell, instead it uses the RichTextBox control which does not have a PassWord property. In a future release, we will be adding many additional celltypes, including a celltype that uses the Windows Forms textbox, and thus has a password property. If you just want to handle the display if the password, and not allow in-cell editing of the password, then you can handle the PrepareViewStyleInfo event and handle things there. If you do not set the Static celltype, then the cell will be editable, but it would show the old password when you start the edit. There are ways around this as well, but it would take more work.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.GridPrepareViewStyleInfoEventArgs e)
	//password column
	if(e.RowIndex > 0 && e.ColIndex == 2 && e.Style.Text.Length > 0)
		string s = new String('*', e.Style.Text.Length);
		e.Style.Text = s;
		e.Style.CellType = "Static";


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon