I use the following treeview component at : http://objectlistview.sourceforge.net/
I have the following classes:
public class UCSBladeFibreStorage
{
private UCSBladeFibreConfig _BladeFibreConfiguration = new UCSBladeFibreConfig();
public UCSBladeFibreConfig BladeFibreConfiguration
{
get { return _BladeFibreConfiguration; }
set { _BladeFibreConfiguration = value; }
}
private List<UCSBladeNexusSANMapping> _BladeMappedSANs = new List<UCSBladeNexusSANMapping>();
public List<UCSBladeNexusSANMapping> BladeMappedSANs
{
get { return _BladeMappedSANs; }
set { _BladeMappedSANs = value; }
}
}
I populate the treeview as follows:
//Code to populate TreeListView control goes here
treeListView1.CanExpandGetter = delegate(object x)
{
return (x is UCSBladeFibreStorage);
};
treeListView1.ChildrenGetter = delegate(object x)
{
if (x is UCSBladeFibreStorage)
return ((UCSBladeFibreStorage)x).BladeMappedSANs;
throw new ArgumentException("Invalid data");
};
treeListView1.Roots = BladeStorageMappings.BladesFibreStorage;
this.olvColumn1.AspectGetter = delegate(object x)
{
if (x is UCSBladeFibreStorage)
{
return ((UCSBladeFibreStorage)x).BladeFibreConfiguration.BladeName;
}
if (x is UCSBladeNexusSANMapping)
{
return ((UCSBladeNexusSANMapping)x).NexusMappedSAN.SANName;
}
throw new ArgumentException("Invalid data");
};
This produces the following:
However I need to add a "custom node" so the the results appears as follows:
How do I add the "Mapped SANS" node?