DataNavigateUrlField target

8 posts, 0 answers
  1. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 12 Dec 2012 Link to this post

    How set DataNavigateUrlField target?
    I load telerik:RadMenu from SqlDataSource and want to bind target field....
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Dec 2012 Link to this post

    Hi Kjell,

    I suppose you want to use a databinding to specify the Target for all menu items. Try the following code snippet.

    ASPX:
    <telerik:RadMenu runat="server" ID="RadMenu1">
        <DataBindings>
            <telerik:RadMenuItemBinding Target="myTarget" />
        </DataBindings>
    </telerik:RadMenu>

    If the the name of the window is stored in the database you can use the following databinding.

    ASPX:
    <telerik:RadMenu runat="server" ID="RadMenu1">
        <DataBindings>
            <telerik:RadMenuItemBinding TargetField="WindowName" />
        </DataBindings>
    </telerik:RadMenu>

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 19 Jun 2013 Link to this post

    Target Field will not work anymore, it's changed in the latest version?
  5. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 20 Jun 2013 Link to this post

    Hi Kjell,

    What is the exact version of the Telerik.Web.UI.dll that you use?
    We tested the behavior with the latest version (2013.2.611.40) and it works.

    Here is a sample code:
    <telerik:RadMenu
        runat="server"
        ID="RadMenu1"
        DataSourceID="XmlDataSource1"
        DataFieldID="id"
        DataFieldParentID="parentID" >
        <DataBindings>
            <telerik:RadMenuItemBinding Depth="0" TextField="Text" CssClass="rootItems" Target="_blank" NavigateUrlField="NavigateUrl"/>
            <telerik:RadMenuItemBinding Depth="1" ImageUrlField="ImageUrl" TextField="Text" />
        </DataBindings>
    </telerik:RadMenu>
     
    <asp:XmlDataSource runat="server" ID="XmlDataSource1" DataFile="Menu.xml" XPath="/Menu/MenuItem">
    </asp:XmlDataSource>



    Regards,
    Helen
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 20 Jun 2013 Link to this post

    Target works for the root menu, not in  the sub menu......
    I have try Target="_blank"
    I use latest version (2013.2.611.45)


    <telerik:RadPanelBar ID="rpbOmOss" runat="server"
        CookieName="CookieOmOss"
        DataSourceID="SqlOmOssPanel"
        DataFieldID="NodeId"
        DataFieldParentID="ParentNodeId"
        DataTextField="sidnamn"
        DataNavigateUrlField="NavigateUrl"
        EnableEmbeddedSkins="False"
        ExpandMode="SingleExpandedItem"
        OnItemDataBound="RadPanelBar1_ItemDataBound"
        PersistStateInCookie="True"
        Skin="NewTransparent"
        Width="100%" Height="380px">
        <DataBindings>
            <telerik:RadPanelItemBinding TargetField="target" Depth="0" Expanded="True" />
        </DataBindings>
    </telerik:RadPanelBar>
  7. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 20 Jun 2013 Link to this post

    Hi Kjell,

    Please change the DataBindings setting to affect the second level as well:

    <DataBindings>
           <telerik:RadPanelItemBinding TargetField="target" Depth="0" Expanded="True" />
           <telerik:RadPanelItemBinding TargetField="target" Depth="1" Expanded="True" />
    </DataBindings>

    You have a setting only for root level.

    Regards,
    Helen
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  8. Kjell
    Kjell avatar
    203 posts
    Member since:
    May 2011

    Posted 18 Jan in reply to Helen Link to this post

    And now the TargetField have stop work again. What to do?

    I have:

        <DataBindings>
            <telerik:RadPanelItemBinding TargetField="target" Depth="0" Expanded="False" />
            <telerik:RadPanelItemBinding TargetField="target" Depth="1" Expanded="True" />
        </DataBindings>

  9. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 19 Jan Link to this post

    Hello Kjell,

    What is the exact version of the Telerik.Web.UI that you use?
    Could you open a support ticket and send us your complete code to examine it locally?


    Regards,
    Helen
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017