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

Radmenu Display Address of NavigateUrl in RadPane

1 Answer 85 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 18 Feb 2009, 03:04 AM
Hello everyone, 
I created a radmenu with a objectdatasource which has its ID, parent, name, url and I want the press the menu option the URL is displayed in radpane.

<

 

telerik:RadSplitter ID="RadSplitter1" Runat="server" Height="560px" meta:resourcekey="RadSplitter1Resource1"

 

 

SplitBarsSize="" Width="921px">

 

 

    <telerik:RadPane ID="pane_left" runat="server" Width="25px" Scrolling="None"

 

 

        Locked="True" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False"

 

 

        Height="" Index="0" meta:resourcekey="pane_leftResource1" Skin="">

 

 

            <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" ClickToOpen="True"

 

 

                Width="25px" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False"

 

 

                Height="100%" meta:resourcekey="RadSlidingZone1Resource1" Skin="">

 

 

            <telerik:RadSlidingPane ID="RspPrincipal" runat="server" Width="250px"

 

 

                Title="Menu Principal" Font-Size="Medium"

 

 

                EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="0"

 

 

            meta:resourcekey="RspPrincipalResource1" Skin="">

 

 

            <!-- ACA Insertamos el menu de los usuarios !-->

 

 

        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"

 

 

                DataObjectTypeName="ServisistemasAra.FoxisWeb.BusinessEntities.Menus"

 

 

                DeleteMethod="Delete" InsertMethod="Save"

 

 

                OldValuesParameterFormatString="original_{0}" SelectMethod="GetList"

 

 

                TypeName="ServisistemasAra.FoxisWeb.Bll.MenuManager"></asp:ObjectDataSource>

 

 

                <telerik:RadMenu ID="RadMenu2" Runat="server"

 

 

                DataSourceID="ObjectDataSource1" DataFieldID="Id"

 

 

                DataFieldParentID="ParentId" DataNavigateUrlField="Funcion"

 

 

                DataTextField="Descripcion" DataValueField="Id">

 

 

                <CollapseAnimation Duration="200" Type="OutQuint" />

 

 

                </telerik:RadMenu>

 

 

    </telerik:RadSlidingPane>

 

 

    <telerik:RadSlidingPane ID="RspNoticias" runat="server" Width="400px"

 

 

            Title="Noticias" Font-Size="Medium"

 

 

            EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="0"

 

 

            meta:resourcekey="RspPrincipalResource1" Skin="">

 

 

            <!-- ACA Insertamos el menu de los usuarios !-->

 

 

        </telerik:RadSlidingPane>

 

 

</telerik:RadSlidingZone>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar ID="Radsplitbar1" runat="server"

 

 

EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="1"

 

 

meta:resourcekey="Radsplitbar1Resource1" Skin=""></telerik:RadSplitBar>

 

 

<telerik:RadPane ID="pane_centro" runat="server" Width="911px" Height="37px"

 

 

EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False" Index="2"

 

 

meta:resourcekey="pane_centroResource1" Skin="">

 

 

<!-- Centro Display de navigateurl of menu in this pane!-->

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

Thanks for your colaboration

Alex

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 18 Feb 2009, 08:50 AM
Hello Alex,

Please find below a sample code snippet that shows the needed approach.

ASPX:
<form id="form1" runat="server"
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"
</telerik:RadScriptManager> 
<telerik:RadSplitter ID="RadSplitter1" runat="server"
    <telerik:RadPane ID="RadPane1" runat="server"
    <telerik:RadMenu ID="RadMenu1" runat="server" DataFieldID="Id" DataFieldParentID="ParentId" 
        DataNavigateUrlField="Funcion" DataSourceID="SqlDataSource1" DataTextField="Descripcion" 
        DataValueField="Id" OnItemDataBound="RadMenu1_ItemDataBound"
        <CollapseAnimation Duration="200" Type="OutQuint" /> 
    </telerik:RadMenu> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:C:\PROGRAM FILES\TELERIK\RADCONTROLS FOR ASPNET AJAX Q3 2008\LIVE DEMOS\APP_DATA\TELERIK.MDFConnectionString %>" 
        SelectCommand="SELECT * FROM [test_Table1]"></asp:SqlDataSource> 
    </telerik:RadPane> 
    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> 
    <telerik:RadPane ID="RadPane2" runat="server" ContentUrl="blank.aspx"
    </telerik:RadPane> 
</telerik:RadSplitter> 
</form> 

Code-behind:
using System; 
using System.Data; 
using System.Configuration; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
using Telerik.Web.UI; 
 
public partial class _Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
         
    } 
    protected void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e) 
    { 
        if (e.Item.NavigateUrl != null
        { 
            e.Item.Target = RadPane2.ClientID; 
        }  
    } 



Best wishes,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
Alex
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or