Tabstrip not reloading after onclick

2 posts, 0 answers
  1. saroj
    saroj avatar
    39 posts
    Member since:
    Oct 2011

    Posted 04 Apr 2013 Link to this post

    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");
            })
        )

  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 08 Apr 2013 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top