We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Problem in TreeNodeAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

97606 Dec 16,2010 12:32 AM Dec 17,2010 03:58 AM Windows Forms 1
loading
Tags: Tools
Prabu Natarajan
Asked On December 16, 2010 12:32 AM

Hi
I am using TreeNodeAdv Control to show the my details in tree format at runtime. i am loading the my details through XML ..
.I have one problem in Image Loading in tree view .

I found one code for loading the image file in tree view , but i can't understand the code

this.leftImageList = new System.Windows.Forms.ImageList(this.components);
treeNodeAdv2.LeftImageIndices = new int[] {
0};

For Example I have tree structure like this

Backup Reports
SimpleReport
Details
SourceName
spname
Details
SimpleReport
DDReport
Details
SimpleReport
Details
SourceName
spname
Details
SimpleReport
Details
DDReport
Backup Reports

now I need FolederIcon(closed icon)in Node BackupReports before
Expand,after expand the tree view change the node BackupReports(Open icon)Image.How to i set the image in node. and that image are placed in my bin floder(Application.startpath).
Here i attach my sample application also.send any sample code are sample file for that problem.




TreeView Poc In Syncfusion_e3f2888e.zip

Jeraldes J [Syncfusion]
Replied On December 17, 2010 03:58 AM

Hi Prabu,

Thanks for your interest in Syncfusion Products,

When child nodes are added to a node, automatically the expand / collapse (+/-) images are set by default, to the parent node, which indicates whether the nodes are opened or closed. These default images can be replaced with custom images using NodeStateImageList property.

Images for individual nodes can be specified in treeNodeAdv.ExpandImageIndex / treeNodeAdv.CollapseImageIndex properties. Setting these properties will override the expand / collapse image settings that is applied for the control.

Before that add the images to the ImageList Control. Please refer with the code snipet and the modified sample for more details.

[Code Snippet]

this.m_roottreeviewadv.NodeStateImageList = this.imageList1;
this.m_roottreeviewadv.Nodes[0].ExpandImageIndex=0;
this.m_roottreeviewadv.Nodes[0].CollapseImageIndex = 1;

[User Guide Link]

http://help.syncfusion.com/ug_84/User%20Interface/Windows%20Forms/Tools/Documents/expandandcollapseimage.htm

[Sample Link]

http://www.syncfusion.com/uploads/redirect.aspx?file=WF-TreeView-XML-97606_9e34b4ed.zip&team=development

Please let us know if you need any other details.

Regards,
Jeraldes J



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;