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

Multi column & Sitemap Datasource

8 Answers 252 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 13 Jul 2010, 03:19 PM
Hi

I have a site map datasource and a RadMenu with security trimming enabled, Now I want to use multiple columns, how can I do this?

I also need direction, when using a datasource, I have a top level node in a table, with child nodes, I'm trying to display the top nodes (no problem) and the child nodes in a multi column - this is where I'm also having trouble.


Andy

8 Answers, 1 is accepted

Sort by
0
Andy Green
Top achievements
Rank 1
answered on 16 Jul 2010, 11:54 AM
Any Takers?
0
Veronica
Telerik team
answered on 19 Jul 2010, 04:35 PM
Hi Andy Green,

I've created a sample project as the example Filtering Site-Map Nodes Based on Security Roles in MSDN.
In my example I use multi-column RadMenu. You can see how to create multi-column RadMenu in this demo.

I use authentication type "from the Internet" with two users:

Username: Customer01
Password: 123456@

Username: Employee01
Password: 123456@

Please take a look at the attached project and see how to filter the RadMenu Items via sitemap nodes based on Security Roles.

Regards,
Veronica Milcheva
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
Andy Green
Top achievements
Rank 1
answered on 20 Jul 2010, 07:50 AM

Thank you Veronica, but your response isn't quite there ,

I have security trimming working, and I have read the posts on multi column and can do this, what I need to know is, is it possible to control what appears in the Multi Columns based on Security trimmimg. From what I've read I'd guess no because this looks like its done through templates, can you confiirm.

If this is not possible, another approach would be to populate the multi colums from a database (and do the security there) but I cant see how to populate the multi columns from a datasource.

Any more help would be greatly appreciated, I've been stuck with this for days now.

Andy.

 

 PS - what might help would be a look at the sitemapdatasource for the multi column demo in the example you sent. That might be the missing link.

0
Veronica
Telerik team
answered on 23 Jul 2010, 07:27 AM
Hello Andy Green,

I think there was a misunderstanding.

In my example at first you should not see the "Discounts" menu item as it is only for employees. If you log in as Employee01 you will be able to see the Discounts.

This could be seen at first:


This could be seen after you log in as a Employee:


In my example I control what appears in the Multi Columns based on Security trimmimg. Please take a look at it and feel free to ask me if you have any questions.
 
The multi-column menu is not done by templates. This feature is controlled through a pair of properties - RepeatColumns and RepeatDirection (either DefaultGroupSettings or per-item GroupSettings). Please take a look at this help topic for more information.

Regards,
Veronica Milcheva
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
King Wilder
Top achievements
Rank 2
answered on 22 Oct 2010, 03:06 AM
I have a question about this topic, I'm trying to get the "Home" link to show up in the same level as the Products and Services.  Is this possible?

I need the securitytrimming feature, but I would also like to have the "Home" link included in the menu.

Thanks,

King Wilder
0
Veronica
Telerik team
answered on 27 Oct 2010, 01:29 PM
Hi King,

To be able to show the "Home" item - you should set the ShowStartingNode property to "true" in the SiteMapDataSource:

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="true" />

Please let me know if this was helpful. 

Regards,
Veronica Milcheva
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
King Wilder
Top achievements
Rank 2
answered on 28 Oct 2010, 05:43 PM
Veronica,

This doesn't work the way I need, which is to show the menu like this:

Home | Products | Categories | etc

In other words, have the Home link on the same level as the others.  If I just set ShowStartingNode to "true", then the menu will only show "Home" as the top level and then Products and Categories as sub levels.

I also tried creating a subnode in the SiteMap file for Home pointing to the "~/default.aspx" page and it still didn't work.  Nothing showed up.

I'll just Have Home as a completely separate link elsewhere in the header.

Thanks,

King Wilder
0
Veronica
Telerik team
answered on 03 Nov 2010, 02:52 PM
Hello King Wilder,

To be able to show the Menu and SubMenuItems on one row - you should set the Flow property of the RadMenu  to "Vertical":

<telerik:RadMenu ID="RadMenu1" runat="server" DataSourceID="SiteMapDataSource1" Flow="Vertical" >
        </telerik:RadMenu>
        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="true" />

Hope this helps.

Greetings,
Veronica Milcheva
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
Andy Green
Top achievements
Rank 1
Answers by
Andy Green
Top achievements
Rank 1
Veronica
Telerik team
King Wilder
Top achievements
Rank 2
Share this question
or