Tab w/NavigateUrl don't select the tab

10 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 22 Apr 2012 Link to this post

    I set the nav url on some tabs, and those tabs dont correspond to a pageview of any sort...I just want them to be links.

    However currently when I click the tab with the navUrl set it selects it...is there a way to prevent that from happening?
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 25 Apr 2012 Link to this post

    Hi Steve,

    Can you please elaborate on your scenario? For instance what is the functionality that you trying to achieve. In general when you need to explicitly specify the RadPageView for a particular tab you can use the PageViewID property and set the id of the desired page.  

    Regards,
    Kate
    the Telerik team
    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 their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 25 Apr 2012 Link to this post

    There's no RadMulitpage involved, it's just the tabstrip hanging out on the page and I'm using tab clicks to perform other tasks.  However in the case of wanting one of the tabs to be a link with NavigateUrl, it doesn't make sense to click it, opens a new window, then when the user has gone back to my page the navurl tab is selected, and there's no corresponding "tab page" to look at.

    I'd rather have the nav url tab just open a new window and not get the depressed (selected) tab state

    Know what I mean?
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 30 Apr 2012 Link to this post

    Hi Steve,

    Thanks for clarifying. To achieve this functionality you could use the client-side OnClientTabSelected event and open a RadWindow as described in the following demo - http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx . Thus you can easily get the desired behavior.

    Kind regards,
    Kate
    the Telerik team
    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 their blog feed now.
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 30 Apr 2012 Link to this post

    Hey Kate,
      Yeah, thought of that, but that's not going to work :/  I need it to open in a new window...it's a redistributable sitefinity control so I don't want to bloat the page by having to force down the radwindow scripts and styles as well (on top of having the user needing to skin the window ontop of the tabstrip).

    Expected behavior for the users is click the tab, new window opens, is that not possible?
  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 03 May 2012 Link to this post

    Hello Steve,

    You can you try using the Target property of the RadTabs. It provides the options to open a particular page in the current page or in another tab of the browser depending on the value that you set.  

    Regards,
    Kate
    the Telerik team
    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 their blog feed now.
  8. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 03 May 2012 Link to this post

    Well that's not the issue...it IS already opening in a new window...the problem is the Tab is becoming selected (and shouldn't be), and since it's just a link there's no pageview associated.
  9. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 08 May 2012 Link to this post

    Hi Steve,

    In general this is the expected behavior when you set NavigateUrl property of the control. However, if you need the tab not to look selected you could get the correct css class selector and override the existing styles. You can take a look at the following help topic where the different css classes are fully described.

    Kind regards,
    Kate
    the Telerik team
    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 their blog feed now.
  10. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 08 May 2012 Link to this post

    Hey Kate, no I don't need it to not LOOK selected...I physically need it to not be selected.

    So I'm on tab 2 (which is normal), and tab 3 is the navigateUrl tab.

    When I click tab3 I want the new window to open (it does), but tab2 and it's pageview should still be selected.

    Does that make sense?...I might not be explaining it right
  11. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 11 May 2012 Link to this post

    Hi Steve,

    Have you tried cancelling the tabSelecting event? Please take a look at the example pseudo code:

    function tabSelecting(sender, args) {
                if (tab is tab 3)
                    args.set_cancel(true);
            }

    I hope that this helps.


    Greetings,
    Genady Sergeev
    the Telerik team
    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 their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017