Tabstrip selected index issue

2 posts, 0 answers
  1. Dayana Maliyakal
    Dayana Maliyakal avatar
    27 posts
    Member since:
    Jan 2010

    Posted 24 May 2014 Link to this post

    Hi Telerik Team,

          Here I have got three tabs.
         I want to get tabindex while selecting each tab and based on this tabindex I have to bind a grid.How to get tabindex while selecting tab?

    Tab is shown as an attached file.

    <script>
    function rtsTasksSelect(e) {
    }
    </script>

      @(Html.Kendo().TabStrip()
              .Name("rtsTasks")
               .Items(tabstrip =>
               {
                   tabstrip.Add()
                       .Text("All")//To set Extra tab
                       .Selected(true)//To get default selection of this tab
                       .HtmlAttributes(new { Style = "Width:100%;" });
               })
              .BindTo(Model.ItemType.CreateTabStrip(),
                    (item, navigationData) =>
                    {               
                        item.ImageUrl = "../" + "../" + navigationData.ImageUrl;
                                                                       
                    })
              .Events(events => events
                  
                  .Select("rtsTasksSelect")              
                   )
             
                )
  2. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 27 May 2014 Link to this post

    Hi Dayana,

    Generally, you may not need the exact index of the selected TabStrip item, because the widget's select event provides references to the respective content container and you can locate the Grid inside via standard DOM / jQuery traversal:

    http://docs.telerik.com/kendo-ui/api/web/tabstrip#events-select

    If you prefer using indexes, then using jQuery index() in combination with e.contentElement will help.

    Regards,
    Dimo
    Telerik
     
    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
Back to Top