Kendo UI TabStrip Helper

154 views Asked by At

I am newbie in Telerik (Kendo). I want to know how can I hide or show tab based on roles or authentication as per user. I guess its been done by Helper, but I am not sure how to do it.

Please help me regarding this.

Thanks in advance.

Regards,

DS

1

There are 1 answers

0
TResponse On

Its a bit difficult to provide you with the best answer without seeing what you have so far, but if your initializing the TabStrip using JavaScript you will have a list if tabs in your html:

<div id="example">
<div id="tabstrip">
    <ul>
        <li id="TabParis" class="k-state-active">
            Paris
        </li>
        <li id="TabNewYork">
            New York
        </li>
        <li id="TabLondon">
            London
        </li>
    </ul>
    <div>
        <div class="weather">
            <h2>17<span>ºC</span></h2>
            <p>Rainy weather in Paris.</p>
        </div>
        <span class="rainy"> </span>
    </div>
    <div>
        <div class="weather">
            <h2>29<span>ºC</span></h2>
            <p>Sunny weather in New York.</p>
        </div>
        <span class="sunny"> </span>
    </div>
    <div>
        <div class="weather">
            <h2>21<span>ºC</span></h2>
            <p>Sunny weather in London.</p>
        </div>
        <span class="sunny"> </span>
    </div>
</div>

Give each of the tab list items an id.

Then simply show or hide the list item by Id using JQuery

$('#TabNewYork').hide()

Here is a working example in JSFiddle: http://jsfiddle.net/loanburger/9mLz5wnc/