Multiple selects on tabstrip using JS

4 posts, 0 answers
  1. Iram
    Iram avatar
    9 posts
    Member since:
    Apr 2015

    Posted 07 Oct 2015 Link to this post

    Hello,

     We have a tabstrip control that is already initialized and we are referencing that using : $("#tabstrip").data("kendoTabStrip"). We would like to perform multiple selects on different tabs one after the other:

     Here is the Dojo for that.

    http://dojo.telerik.com/iJOGe/24

    If we set the animation to false, it works but since the tabstrip is already initialized we would like to perform a second select after the animation is completed or remove the animation from the tabstrip component completely. We do not intend to use a timeout. Is there a way we can achieve this?

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 07 Oct 2015 Link to this post

    Hello Iram,

    I am not sure that I understand the use case for selecting different tabs in such manner, but the easiest way for achieving this would be by disabling the animation:
    var tabStrip = $("#tabstrip").kendoTabStrip({
      animation: false
    }).data("kendoTabStrip");

    However, if you want to keep the animation and change the selected tab after the previous one is selected, you should handle the activate event, but  with some custom logic for preventing the logic to be executed on each tab change:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Iram
    Iram avatar
    9 posts
    Member since:
    Apr 2015

    Posted 07 Oct 2015 in reply to Konstantin Dikov Link to this post

    Hello @Konstantin Dikov,

     Thanks for the answer, however I do not want to reinitialize the TabStrip control as I do not have control over the initializing of the tabStrip control, its already done server-side. All I can do now is get a reference to that control and manipulate it client side. Is there a way I can achieve the animation: false and selection of the second tab using a control that has already been initialized? Kindly let me know.

     

    Cheers.

  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1793 posts

    Posted 09 Oct 2015 Link to this post

    Hi Iram,

    Can you please elaborate why you need to disable the animation on client-side and not when you initialize the control in the first place?

    Currently, the only thing that I could suggest without re-initialization of the widget would be to try the following:
    tabStrip.options.animation.open.duration = 0;
    tabStrip.options.animation.open.effects = "none";
    tabStrip.options.animation.close.duration = 0;
    tabStrip.options.animation.close.effects = "none";


    Regards,
    Konstantin Dikov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready