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

Tabstrip not reloading after onclick

1 Answer 492 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
saroj
Top achievements
Rank 1
saroj asked on 04 Apr 2013, 11:31 PM
Hi,

I had a popup window, which opens from the button inside tabstrip "Regime sequence" and i want my tabstrip to reload once the window is closed. But it is not reloading from my below script. Why??

Below is my code:

<script type="text/javascript">
$(document).ready(function () {
$(".k-window-action.k-link").click(function () {

var tabStrip = $("#abc").data("kendoTabStrip"); //finding tabstrip
var tabContent = $("#abc").data("kendoTabStrip").contentHolder(1); //selecting particular tab
tabStrip.reload(tabContent); //reloading the tab
}); 
});
</script>

 @(Html.Kendo().TabStrip()
        .Name("workshopServiceRegime_#=REGIME_ID#")
        .HtmlAttributes(new { @style = "margin-left:-40px", @id="abc" })
        .SelectedIndex(0)
        .Items(items =>
        {
            items.Add()
                .Text("Regime detail")
                .LoadContentFrom("ServiceRegimeDetail", "ServiceRegimeDetail");
            items.Add()
                .Text("Regime sequence")
                .LoadContentFrom("ServiceRegimeSequenceList", "ServiceRegimeSequenceList");
            items.Add()
                .Text("Regime MMSB")
                .LoadContentFrom("MMSBServiceRegimeList", "MMSBServiceRegimeList");
        })
    )

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 08 Apr 2013, 02:35 PM
Hello Saroj,

The reload method expects the tabstrip item element instead of the content element so in order to reload the second item, you could use code similar to the one in the snippet below:

var tabStrip = $("#TabStripName").data("kendoTabStrip");
var item = tabStrip.items()[1];
tabStrip.reload(item);
Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TabStrip
Asked by
saroj
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or