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

Changing TabStrip Content when Tab is selected

3 Answers 1237 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Chinmay
Top achievements
Rank 1
Chinmay asked on 20 May 2017, 01:24 PM

Hi, I am kind of new in Kendo UI for Angular 2 and i wish to call a web service when a Tab is selected so i can fetch data to fill in the Tab Contents.

Is there a way to call or invoke a method when a Tab is selected?

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 22 May 2017, 08:28 AM
Hello,

yes, you can use the tabSelect event of the TabStrip for that purpose.

Regards,
Petyo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Chinmay
Top achievements
Rank 1
answered on 22 May 2017, 09:31 AM
Can you please provide a example , basically i wish to display Chart inside each tabs and when a tab is selected , a request is made to the server which provides the data to the charts  
0
Petyo
Telerik team
answered on 23 May 2017, 12:32 PM
Hello,

we don't have an example of such kind available, but from what I understand, the Angular rendering mechanism will take care of that for you - especially if you set the `keepTapContent` to false, since the hidden tabs won't be rendered and thus they won't trigger the HTTP service promises. 

In case you find this a bit unclear, I may suggest that you exercise the implementation with vanilla angular, using angular's structural directives (ng-for to bind to a given data, and ng-if to hide the container elements).

Regards,
Petyo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TabStrip
Asked by
Chinmay
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Chinmay
Top achievements
Rank 1
Share this question
or