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

Tabstrip selected index issue

1 Answer 277 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Dayana Maliyakal
Top achievements
Rank 1
Dayana Maliyakal asked on 24 May 2014, 09:39 AM
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")              
               )
         
            )

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 May 2014, 02:59 PM
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!
 
Tags
TabStrip
Asked by
Dayana Maliyakal
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or