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

Disable Tab

3 Answers 78 Views
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 21 Mar 2013, 06:11 PM
How do I disable certain tabs in my mobile tabstrip?

3 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Nikolova
Telerik team
answered on 25 Mar 2013, 07:23 AM
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!
0
David Gerding
Top achievements
Rank 1
answered on 06 Nov 2013, 11:55 PM
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
0
Iliana Nikolova
Telerik team
answered on 08 Nov 2013, 05:04 PM
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!
Asked by
Barry
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
David Gerding
Top achievements
Rank 1
Share this question
or