This is a migrated thread and some comments may be shown as answers.

How to hide root.

5 Answers 121 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ryan C
Top achievements
Rank 1
Ryan C asked on 22 Mar 2010, 11:08 AM
I would like to display the items from the 2nd level onwards. How can this be accomplished?

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Mar 2010, 12:04 PM
Hello Ryan,

I am not quite sure about the scenario. If you want to hide the radmenuItem and want to use the child items, then use the display style setting between none and block. Here is the example of how to perform this.

C#:
 
RadMenu1.FindItemByText("Root RadMenuItem1").Style.Add("display""block"); // Show the item 

JavaScript:
 
<script type="text/javascript">   
function Visibility()   
{   
    var menu = $find("<%= RadMenu1.ClientID %>");   
    var item = menu.findItemByText("Root RadMenuItem1");   
    item.get_element().style.cssText = "display: none;";  // Hide the item 
}   
</script>  

Hope this helps,
Princy.
0
Ryan C
Top achievements
Rank 1
answered on 22 Mar 2010, 12:23 PM
Well I'm using an SQL data source to bind with my RadMenu control. And I got the following Structure:

-->Website Sitemap
---> Home
---> Products
---> Item A
---> Item B
---> About Us
---> Contact Information
---> History
---> Help

Now when I view my page with the RadMenu, all I get displayed is "Website Sitemap", is there a featrue where I can start display from the 2nd level, i.e. Home, Products, About Us, Help?
0
Kamen Bundev
Telerik team
answered on 22 Mar 2010, 12:34 PM
Hello Ryan,

ASP.NET's and Telerik's SiteMapDataSources have a property ShowStartingNode. Set it to false and you're set.

Sincerely yours,
Kamen Bundev
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.
0
Ryan C
Top achievements
Rank 1
answered on 22 Mar 2010, 01:53 PM
Thanks, but I'm using the SqlDataSource to retrieve my data. Could you point me to some documentation on how to use the RadSiteMapDataSource to get my data from a table in SQL?
0
Peter
Telerik team
answered on 23 Mar 2010, 02:08 PM
Hello Ryan,

Here is an online demo for reference:

http://demos.telerik.com/aspnet-ajax/sitemap/examples/datasources/defaultcs.aspx


All the best,
Peter
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.
Tags
Menu
Asked by
Ryan C
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ryan C
Top achievements
Rank 1
Kamen Bundev
Telerik team
Peter
Telerik team
Share this question
or