cancel
Showing results for 
Search instead for 
Did you mean: 

How to add icon to trree node

Former Member
0 Kudos

HI all,

I am using tree control of SAP PDK .Net.

I need to add icon to tree node.

Can any one has idea how to add ?

Any help appreciated?

Sunil Pawar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sunil,

please have a look at the following classes and properties

It mentions the IconSource Porperty (with get and set methods)

Tree Node Class:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/lw/developercontent/sap%20portal%20development%20kit%20for%20.net%20developer's%20Guide/SAP.Web~SAP.Web.UI.Controls.TreeNode_properties.html

AbsractTreeNode Property :

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/lw/developercontent/sap%20portal%20development%20kit%20for%20.net%20developer's%20Guide/SAP.WebSAP.Web.UI.Controls.AbstractTreeNodeTypeIconSource.htm

with respect,

amitl

Former Member
0 Kudos

Hello Amit,

Thanks for your reply.

I tried assigning image url to icon source property but still images are not visible for the nodes.

Is there any specific condition for this ?

OR

Can you please post code snippet for the same ?

Regards,

Sunil Pawar

Message was edited by:

Sunil Pawar

Former Member
0 Kudos

hi Sunil,

Please note the differences between programming in EP and in a regular ASP.NET application

IconSource :Determines the URL where this icon gets its data

as the portal application resides in EP and not in regular ASP.NET

you would need to give relative URL's from within the PCD :

eg :

ROLES://pcd/myfolder/myimage.jpg

if you host your images in an externat IIS / web server you could use

http://myintranet.myfirm.com/myportalapps/images/mytreeicon.jpg

with respect,

amit

Former Member
0 Kudos

Hi Amit,

Can you please explain how to add the image to the PCD and how to get relative path of that image within the PCD.

Thanks in advance.

Regards,

Sunil Pawar.