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

Dynamically adding tabs with content loaded from an action

1 Answer 129 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Miechko
Top achievements
Rank 1
Miechko asked on 19 Oct 2018, 06:50 PM

Hi,

I am trying to have a list of Offices for an Organisation edited from a tabstrip, i can load the data and perform modifications easily but my problem arises when i want to add a new office when i click on a button. i use the API to add a tab but i do not know if it is possible for me to specify that the content should be loaded from an action. 

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 24 Oct 2018, 10:00 AM
Hello Miechko,

Yes, that should be possible. When using the append() method, you only need to specify the contentUrl for the newly added TabStrip item to point to the server action in question:
var tabStrip = $("#tabstrip").data("kendoTabStrip");
 
tabStrip.append({
  text: 'Item 3',
  contentUrl: '@Url.Action("Action", "Controller")'
});

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TabStrip
Asked by
Miechko
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or