Disable Tab

4 posts, 1 answers
  1. Barry
    Barry avatar
    7 posts
    Member since:
    Feb 2013

    Posted 21 Mar 2013 Link to this post

    How do I disable certain tabs in my mobile tabstrip?
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 25 Mar 2013 Link to this post

    Hello Barry,

    Apologies for not getting back to you earlier.

    I am afraid disabling tabs in Kendo UI Mobile TabStrip is not supported at present. As a possible workaround I can suggest you to attach an event handler to the select event and prevent the selection (with e.preventDefault()) if the tab fits some conditions. For example: 
    $("#tabStrip").kendoMobileTabStrip({
        select: function(e) {
           //get the id of the selected tab
           var disabledTabId = $(e.item).attr("id");
           //check if selected tab's id is "someId" and prevent the selection
           if(disabledTabId == "someId"){
               e.preventDefault();
           }
        }
    });

    Regards,

    Iliana Nikolova
    the Telerik team
    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. David Gerding
    David Gerding avatar
    44 posts
    Member since:
    Sep 2005

    Posted 06 Nov 2013 Link to this post

    Hi,
    This approach didn't work for me.  I cut and paste the code and added my own appropriate id values ... but the event doesn't even seem to fire - at least the console.log I tried there never seems to fire.  Any thoughts or different approaches?

    Thanks, Dave G
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 08 Nov 2013 Link to this post

    Hi Dave,

    I tested the suggested approach and everything is working as expected on my side. For your convenience here is a jsBin example - could you please edit it and show me your current implementation? This way I would be able to advice you further and provide concrete recommendations. Thank you in advance for your time and cooperation.
     

    Regards,
    Iliana Nikolova
    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