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

Disable tabs in child grid doesn't work correctly

1 Answer 275 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Дмитрий
Top achievements
Rank 1
Дмитрий asked on 06 Aug 2016, 04:09 PM
Hello! 

 

When I use this code to disable 2nd and 3rd tab in each detailed row I see that only first expanded row has those tabs disabled - and all other rows that I expand are enabled - what am I doing wrong? Thanks for help!

var tabStrip = $("#mytabstrip").kendoTabStrip().data("kendoTabStrip");
            tabStrip.disable(tabStrip.tabGroup.children().eq(1));
            tabStrip.disable(tabStrip.tabGroup.children().eq(2));

 
<script type="text/x-kendo-template" id="template">
         <div class="tabstrip" id="mytabstrip">
             <button id="gridButton">gridButton</button>
             <ul>
                 <li class="k-state-active" id="AccountsTab">
                     Счета                       
                 </li>
                 <li id="AccountInfoTab">
                     Полная информация по счету:
                 </li>
                 <li id="BillEventsTab">
                     Просмотр событий по счету:
                 </li>
             </ul>
             <div>
                 <div id="account" class="Account"></div>
             </div>
              
         </div>
 
     </script>

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 09 Aug 2016, 12:40 PM
Hello Дмитрий,

The provided code snippet suggests that multiple elements with the same IDs ('mytabstrip', 'gridButton', etc.) are created. This is invalid HTML that can lead to multiple issues and undesired side effects. The recommended approach is to create all those elements with no IDs, and access them in the master Grid's detailExpand event handler (where the detail row is available via e.detailRow).

I have prepared a simple example, involving the provided TabStrip template, demonstrating the suggested adjustments:

http://dojo.telerik.com/odisA

I hope this helps.

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Tags
TabStrip
Asked by
Дмитрий
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or