Changing TabStrip Content when Tab is selected

4 posts, 0 answers
  1. Chinmay
    Chinmay avatar
    2 posts
    Member since:
    May 2017

    Posted 20 May Link to this post

    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?

  2. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 22 May Link to this post

    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.
  3. Chinmay
    Chinmay avatar
    2 posts
    Member since:
    May 2017

    Posted 22 May in reply to Petyo Link to this post

    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  
  4. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 23 May Link to this post

    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.
Back to Top