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.

Special TreeView Hierarchy

Thread ID:

Created:

Updated:

Platform:

Replies:

70085 Nov 26,2007 12:58 PM Apr 8,2018 08:08 AM ASP.NET Web Forms (Classic) 6
loading
Tags: Tools
Faris Ahmed
Asked On November 26, 2007 12:58 PM

Dear Syncfusion,
I wonder if the TreeView ASP.NET version 5.2 can handle the special hierarchy shown in the attached file.
The idea is simple (we call it ragged hierarchies) I will try to explain it:

1) The hierarchy consists of four levels. Root node is 'All Stores', first level is country ( Canada and USA ), second level is state (like CA and WA for node USA) and the forth level is store name like Alameda for CA.

2) The node Orizaba and Merida belong to Mexcio which is not shown in the hierarchy but the level of the two nodes is maintained.

I tried to reproduce this with version 5.2 but unfortunately I failed! is such behaviour supportd? possible?

Kind regards from Germany,
Faris Ahmed



SpecialHierarchy.zip

Rajarajeswari S [Syncfusion]
Replied On December 3, 2007 03:20 AM


Hi Faris,

Sorry for the inconvenience caused.

Your requirement of having Child nodes without parent node is not at all possible. In a TreeView you have to get the reference of any child node only by using its Parent node. So your requirement is not possible.

Please let me know if you have any other concerns.

Regards,
Raji



Faris Ahmed
Replied On December 3, 2007 07:32 AM

Dear Syncfusion Support,
I totally agree with you! but I don't want to change the object model of the tree view, the nodes shown in the screen shot still have a parent the only thing is they have some horizontal offset.

Please take a look at the attached SpecialHierarchy2.jpg, it shows a 5.2 TreeView, the xxx and yyy nodes have a left padding property set to 24 pixel, this is half the way for me, now I only need to extend the horizonal padding\offset and make the image to appear next to the xxx node, is this possible?

Best regards,
Faris Ahmed


>
Hi Faris,

Sorry for the inconvenience caused.

Your requirement of having Child nodes without parent node is not at all possible. In a TreeView you have to get the reference of any child node only by using its Parent node. So your requirement is not possible.

Please let me know if you have any other concerns.

Regards,
Raji






SpecialHierarchy2.zip

Rajarajeswari S [Syncfusion]
Replied On December 11, 2007 12:35 AM


Hi Faris,

In TreeView control to move the node along with the image you have to set the padding property to the image. Please refer the below code snippet which illustrates this:

.left_image
{
padding-left: 24px;
}

The above class has to be applied to all the states of the TreeViewItemLook. Please refer the below code snippet which illustrates this:

TreeViewItemLook look1 = new TreeViewItemLook();
look1.ID = "look";
look1.StateDataDefault.LeftImageCSSClass = "left_image";
look1.StateDataExpanded.LeftImageCSSClass = "left_image";
look1.StateDataHover.LeftImageCSSClass = "left_image";
look1.StateDataActive.LeftImageCSSClass = "left_image";
//add the look to the treeview.
tv.ItemLooks.Add(look1);

Please refer the sample from the below link which illustrates the above:

http://websamples.syncfusion.com/samples/Tools.Web/5.2.0.25/F70085/main.htm

Please let me know if this helps you out.

Regards,
Raji



Faris Ahmed
Replied On December 12, 2007 12:46 PM

Hi Raji,
Thanks for you support. With your latest suggestion I closer to my goal, nevertheless the hierarchy lines don't reflect the real hierarchy now, please see my attached picture.
Can the hierarchy lines be changed programatically?
Another question can I store extended properties ( like level ) in the TreeNode object? I am missing the Tag property available in all windows control objects.

Thanks,
Faris



Syncfusion.zip

Rajarajeswari S [Syncfusion]
Replied On December 13, 2007 10:35 PM

Hi Faris,

1. Can the hierarchy lines be changed programmatically?

Sorry, It is not possible to change the hierarchy line programmatically.

2. Can I store the extended properties in TreeNode Object?

Sorry again currently we do not provide support to store any extended properties in Node objects. But for every TreeNode there is property called "Value". You can store some text in this and retrieve it using the NodeSelected event.

Please have look at the below link to get more details on this:

http://www2.syncfusion.com/ug_61/toolsweb/default.html

Please let me know if you have any other concerns.

Regards,
Raji



Rafi Irvan
Replied On April 8, 2018 08:08 AM

This is good

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.

;