Disable tabs in child grid doesn't work correctly

2 posts, 0 answers
  1. Дмитрий
    Дмитрий avatar
    3 posts
    Member since:
    Jul 2016

    Posted 06 Aug Link to this post

    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>
  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    347 posts

    Posted 09 Aug Link to this post

    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.
  3. Kendo UI is VS 2017 Ready
Back to Top