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:

Click Here

However I need to add a "custom node" so the the results appears as follows:

Click Here

How do I add the "Mapped SANS" node?

I don't directly see what is so custum about the mapped SANS node.
Could you explain a bit more?

The "Mapped SANS" node doesnt exist in the class. I want to add it as a text node manually

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.