TabStrip LoadContentFrom menu link dynamically

4 posts, 0 answers
  1. Kiran
    Kiran avatar
    13 posts
    Member since:
    Jul 2014

    Posted 13 May 2015 Link to this post

    Hi,

    I am trying to load the razor page/ form as acontent for TabStrip dynamically from Menu click event. The telerik team can help to with sample example.

     

    Thanks,

    Kiran

  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 15 May 2015 Link to this post

    Hello Kiran,

    I am not sure if I understand the question but you can load the content for a tab via JavaScript via the reload method. Changing the URL from which the content is loaded is not supported out of box can be achieved by loading the content in the tab content element via jQuery:
    tabStrip.contentHolder(TabIndex).load("url");


    Regards,
    Daniel
    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
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Kiran
    Kiran avatar
    13 posts
    Member since:
    Jul 2014

    Posted 17 May 2015 in reply to Daniel Link to this post

    Hi Daniel,

     

    I am trying to load the view when I click on menu item. 

    Example: 

    // Menu Item Select Item

    function select(e) {
           var tabstrip = $("#tabstrip").kendoTabStrip({
                   animation: {
                       open: {
                           effects: "fadeIn"
                       }
                   }
              }).data("kendoTabStrip");
           tabstrip.contentHolder(0).load(e.item.children(".k-link").text());
        }

  5. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 20 May 2015 Link to this post

    Hi,

    The widget should be initialized only once so you should move the initialization out of the select event or destroy the existing tabstrip before initializing a new instance.
    As for loading the tab - what is the text used for the menu items? Unless it is the URL to the action method from which the content should be loaded, the provided code will not work. Also, you should set some initial tab for the tabstrip or use the append method to add a new one.

    Regards,
    Daniel
    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 MVC is VS 2017 Ready