Sagar Baheti
Top achievements
Rank 1
Sagar Baheti
asked on 27 Jan 2009, 04:55 AM
Hi,
I am using RadTree and i want a tree without root node. So How can i remove only root node from tree. Please help me.
Thanks,
Sagar
I am using RadTree and i want a tree without root node. So How can i remove only root node from tree. Please help me.
Thanks,
Sagar
4 Answers, 1 is accepted
0
Jeremy Mann
Top achievements
Rank 1
answered on 12 Sep 2009, 10:11 PM
I'm facing the same problem and can't find an answer. I've looked through the help documentation and found how to do it with the XMLDataSource using Xpath and the sitemap datasource, but I'm binding to and ObjectDataSource and need to hide the root node.
This table contains a list of categories... For example: Pants, Tops, Hats, Socks, Underwear, Accessories
From the home page they would see the main treeview showing all the above items. When the person clicks on "Tops" for example, they would then be taken to a sub page. On that page I only want to display the tree with items under the "Tops" classification.
Clothes (tops)
--- Long Sleeve
--- Short Sleeve
--- Sweaters
--------- Wool
--------- cashmere
--------- Cotton
-- Tank Tops
-----------------------------------------
I want it to just say: (Since they are on the Clothes-Tops page)
-----------------------------------------
Long Sleeve
Short Sleeve
Sweaters
---- Wool
---- cashmere
---- Cotton
Tank Tops
-----------------------------------------
Idealy I'd like to have a property of [DisplayRootNodes = false;] but I'm guessing thats not going to happen... So at this point I'm just looking for a solution.
Can anyone help?
This table contains a list of categories... For example: Pants, Tops, Hats, Socks, Underwear, Accessories
From the home page they would see the main treeview showing all the above items. When the person clicks on "Tops" for example, they would then be taken to a sub page. On that page I only want to display the tree with items under the "Tops" classification.
Clothes (tops)
--- Long Sleeve
--- Short Sleeve
--- Sweaters
--------- Wool
--------- cashmere
--------- Cotton
-- Tank Tops
-----------------------------------------
I want it to just say: (Since they are on the Clothes-Tops page)
-----------------------------------------
Long Sleeve
Short Sleeve
Sweaters
---- Wool
---- cashmere
---- Cotton
Tank Tops
-----------------------------------------
Idealy I'd like to have a property of [DisplayRootNodes = false;] but I'm guessing thats not going to happen... So at this point I'm just looking for a solution.
Can anyone help?
0
Hello Jeremy Mann,
Regards,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
RadTreeView does not support this functionality.
However, you can use the standard SiteMapDataSource control to serve you as a data source for the TreeView. You can control the starting Node which the data source will return, so you can achieve your goal relatively easily.
Please read more about the control and its usage here.
Regards,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
GrZeCh
Top achievements
Rank 2
answered on 19 Feb 2010, 03:37 PM
Hello,
does anything related to this issue/request has changed in Q1 2010? In my opinon there should be this kind of possibility. Root node is only taking space by indenting whole treeview.
Thanks
does anything related to this issue/request has changed in Q1 2010? In my opinon there should be this kind of possibility. Root node is only taking space by indenting whole treeview.
Thanks
0
Hi GrZeCh,
Kind regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Currently we do not have plans for adding such a feature to RadTreeView.
Please use a SiteMapDataSource as previously suggested or modify your current data query to return the children of the root Node as root Nodes themselves, so that they appear on the first level of the TreeView.
Kind regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.