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

TabStrip LoadContentFrom menu link dynamically

3 Answers 439 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kiran
Top achievements
Rank 1
Veteran
Iron
Kiran asked on 13 May 2015, 09:01 PM

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

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 15 May 2015, 01:08 PM
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
0
Kiran
Top achievements
Rank 1
Veteran
Iron
answered on 18 May 2015, 04:15 AM

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());
    }

0
Daniel
Telerik team
answered on 20 May 2015, 07:23 AM
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
Tags
TabStrip
Asked by
Kiran
Top achievements
Rank 1
Veteran
Iron
Answers by
Daniel
Telerik team
Kiran
Top achievements
Rank 1
Veteran
Iron
Share this question
or