1. To display password protected data you can override Column.GetTextValue and replace real symbols by password symbol.
2. Override OnEditorSetup to specify password char for editor:
[c#]
private char passwordChar = '*';
private bool inGettingValueForEditor = false;
public override string GetEditValue(NodeBase node)
{
inGettingValueForEditor = true;
try
{
return GetTextValue(node);
}
finally
{
inGettingValueForEditor = false;
}
}
public override object GetValue(NodeBase node)
{
object val = base.GetValue(node);
//translate value if is in editing
if (!inGettingValueForEditor && val != null && val is string)
{
string strval = val as string;
if (strval.Length > 0 && passwordChar != (char)0)
{
val = new string(passwordChar, strval.Length);
}
}
return val;
}
protected override void OnEditorSetup(TextBox editor)
{
base.OnEditorSetup (editor);
if (passwordChar != (char)0)
editor.PasswordChar = passwordChar;
}