You can use a small Hierachycolumn wrapper to implement FormatString functionality:
[C#]
public class FormattedHierarchyColumn : HierachyColumn
{
public FormattedHierarchyColumn(){}
public FormattedHierarchyColumn(string name) : base(name){}
public FormattedHierarchyColumn(string name, string fieldName) : base(name, fieldName){}
private string formatString = \"G\";//general format
[DefaultValue(\"G\")]
public override string FormatString
{
get
{
return formatString;
}
set
{
if (formatString != value)
{
formatString = value;
base.OnChanged(InvalidationMode.ColumnWithoutHeader, false);
}
}
}
private string ValueToString(IFormattable value)
{
return value != null ? value.ToString(FormatString, NumberFormatInfo.CurrentInfo) : \"Value can't be formatted.\";
}
public override string GetTextValue(object value)
{
IFormattable fobj = value as IFormattable;
return fobj != null ? ValueToString(fobj) : base.GetTextValue(value);
}
}