GrapeCity MultiRow Windows Forms Documentation
PasswordChar Property (FilteringTextBoxCell)
Example 


Gets or sets the character used to mask characters of the password in a FilteringTextBoxCell.
Syntax
<BrowsableAttribute(False)>
Public Shadows Property PasswordChar As Char
Dim instance As FilteringTextBoxCell
Dim value As Char
 
instance.PasswordChar = value
 
value = instance.PasswordChar
[Browsable(false)]
public new char PasswordChar {get; set;}

Property Value

A System.Char value that is used to mask characters entered in a FilteringTextBoxCell. If you do not want to mask characters as they are typed, set the value to '\0' (character value). The default is '\0'.
Remarks

The UseSystemPasswordChar property has precedence over the PasswordChar property. Whenever the UseSystemPasswordChar is set to true, the default system password character is used and any character set by PasswordChar is ignored.

When the PasswordChar property is in use, cut, copy, and paste actions in the control using the keyboard cannot be performed. In this case, String.Empty is set in the clipboard. But in editing mode, the behavior is the same as the standard System.Windows.Forms.TextBox.

Important:
When the FilteringTextBoxCell is in password mode because PasswordChar, UseSystemPasswordChar, or ReadOnly are true (or in use), the FilteringTextBoxCell is in restricted mode. In this mode, the ImeMode is disabled but the current ImeMode is cached so that it can be restored if the FilteringTextBoxCell ever becomes unrestricted. From the designer perspective, the ImeMode value shown is the actual value.

Example
This example sets the PasswordChar property.
GrapeCity.Win.MultiRow.FilteringTextBoxCell filterCell1 = new GrapeCity.Win.MultiRow.FilteringTextBoxCell();
filterCell1.FilteringCellName = "text1";
filterCell1.PasswordChar = '*';
//Target cell is "text1" which is in the Row section.
filterCell1.Location = new Point(35, 0);
filterCell1.Style.BackColor = System.Drawing.Color.Red;

GrapeCity.Win.MultiRow.FilteringTextBoxCell filterCell2 = new GrapeCity.Win.MultiRow.FilteringTextBoxCell();
filterCell2.FilteringCellIndex = 1; 
//Target cell index is 1 which is in the Row section.
filterCell2.Location = new Point(115, 0);
filterCell2.Style.BackColor = SystemColors.Info;

GrapeCity.Win.MultiRow.ColumnHeaderSection section = new GrapeCity.Win.MultiRow.ColumnHeaderSection();
section.Height = 20;
section.Cells.AddRange(new GrapeCity.Win.MultiRow.Cell[] { filterCell1, filterCell2 });
section.ReadOnly = false;
section.Selectable = true;

GrapeCity.Win.MultiRow.TextBoxCell text1 = new GrapeCity.Win.MultiRow.TextBoxCell();
text1.Name = "text1";
//This cell is filtered by FilteringTextBoxCell in ColumnHeaderSection.
GrapeCity.Win.MultiRow.TextBoxCell text2 = new GrapeCity.Win.MultiRow.TextBoxCell();

GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { text1, text2 }, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
template1.ColumnHeaders.Add(section);
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 3;
gcMultiRow1[0, 0].Value = "abc";
Dim filterCell1 As New GrapeCity.Win.MultiRow.FilteringTextBoxCell()
filterCell1.FilteringCellName = "text1"
filterCell1.PasswordChar = "*"
'Target cell is "text1" which is in the Row section.
filterCell1.Location = New Point(35, 0)
filterCell1.Style.BackColor = System.Drawing.Color.Red

Dim filterCell2 As New GrapeCity.Win.MultiRow.FilteringTextBoxCell()
filterCell2.FilteringCellIndex = 1
'Target cell index is 1 which is in the Row section.
filterCell2.Location = New Point(115, 0)
filterCell2.Style.BackColor = SystemColors.Info

Dim section As New GrapeCity.Win.MultiRow.ColumnHeaderSection()
section.Height = 20
section.Cells.AddRange(New GrapeCity.Win.MultiRow.Cell() {filterCell1, filterCell2})
section.ReadOnly = False
section.Selectable = True

Dim text1 As New GrapeCity.Win.MultiRow.TextBoxCell()
text1.Name = "text1"
'This cell is filtered by FilteringTextBoxCell in ColumnHeaderSection.
Dim text2 As New GrapeCity.Win.MultiRow.TextBoxCell()

Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {text1, text2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
template1.ColumnHeaders.Add(section)
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 3
GcMultiRow1(0, 0).Value = "abc"
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FilteringTextBoxCell Class
FilteringTextBoxCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.