Load the contents of the tab only when a tab is clicked

2 posts, 0 answers
  1. RJ
    RJ avatar
    7 posts
    Member since:
    Mar 2016

    Posted 04 Apr 2016 Link to this post


    I am using tabstrip to load content from different partial views. I am doing it as below:


        .Items(tabstrip =>
                item.Selected = true;
                item.Html = Html.Partial("Tab1").ToString();
            else if(....)
                item.Selected = true;
                item.Html = Html.Partial("Tab2").ToString();


    When I do it without specifying if/else's, I am having issues loading the partial views. Each partial view is having kendo editor and in the editor we have some content and url's. Without using if/else, when I load the tabs by rendering the partials, the partial that is rendered first is loaded without issues. But the partial that is rendered after loading the first partial, does not load the 2nd partial correctly. It has issues like, url's are not clickable inside of the editor and even the editor is behaving unexpectedly.

    Going through the threads in this forum, gave me the idea of using if/else and I thought that might be helpful. But, I am not sure how to specify the condition in there to know which tab is clicked.


    I tried using condition like if(item.Text.Equals("Tab1"), but this is of no use. I am getting same error again.

    Please help!





  2. Dimo
    Dimo avatar
    8485 posts

    Posted 06 Apr 2016 Link to this post

    Hi Romica,

    Based on the provided information, it sounds like there are duplicate IDs in the various partial views that the TabStrip renders. This violates web standards and cannot be supported. Please use unique IDs in all partial views that may be rendered on the page. The same requirement exists also if a Kendo UI TabStrip is not used.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top