Home - Forums-.NET - FlyTreeView (ASP.NET) - Different icons when using ConvertTabularDataToHierarchical?

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Different icons when using ConvertTabularDataToHierarchical?
Link Posted: 08-Jan-2008 03:39
Hi,

I am using ConvertTabularDataToHierarchical to print my extensive tree and it works excellent. But is there a way to use different icons on each level?

I.e: dTable.Rows.Add(new object[] { 999, 333, "Google.com", "icon.gif"});

BR,
Patrik
Link Posted: 08-Jan-2008 05:31
Yes, probably you should have ImageUrl field in your datatable (where you store "icon.gif").
Or create a FlyNodeBinding in order to bind node ImageUrl property to your custom filed.

Optionally, you can customize every node when it is created and set its ImageUrl any value you want.
You should use FlyTreeView.NodeDataBound event to accomplish this.

You should place your icons to the folder specified in FlyTreeView.ImageSetCustomPath. Or use absolute/app-related URLs.

Feel free to contact me, if you experience difficulties with subj.