Reload tab content in partial view...

5 posts, 1 answers
  1. Robert Madrian
    Robert Madrian avatar
    163 posts
    Member since:
    Apr 2003

    Posted 21 Sep Link to this post

    Hello,

    If I reload the tabstrip Content of the second tab with JavaScript with tabStrip.reload(item) in a partialview the Content is not replaced but
    always appended...

    @(Html.Kendo().TabStrip().Name("tabMitglieddokumenteEdit")
          .Animation(false).Items(tab =>
          {
              tab.Add().Text("Ansicht").Selected(true).Content(@<text><iframe style="position: absolute; height: calc(100% - 70px); width:100%; border: none" frameborder="0" src="@ViewBag.BCPHostUrl/DocumentViewer?source=Mitglieddokumente&id=@Model.Mitglied_ID&docid=@Model.Dokument_ID&w=100&h=100&sidepane=true&toolbar=true"></iframe></text>);
              tab.Add().Text("Dokumentdaten").LoadContentFrom("DokumentEdit_Read", "Mitglieddokumente", new { mitgliedid = @Model.Mitglied_ID, dokumentid = @Model.Dokument_ID });
          }))

    maybe the reason is that the tabstrip is in a partial view but how to avoid that?

    robert

  2. Dimitar
    Admin
    Dimitar avatar
    176 posts

    Posted 25 Sep Link to this post

    Hello Robert,

    I am attaching an ASP.NET Core solution, where a similar scenario to the one described is demonstrated (Reloading a tab of the Kendo UI TabStrip).

    With the above example, the second tab can be reloaded by clicking on the button below the widget. This can be observed in the network tab of the browser - each time the button is clicked, a request is being sent to the remote service to retrieve the contents of the tab. Notice that the content for the tab is returned from a partial view.

    Can you test the example and verify that it is working correctly on your end? In case I am missing something, then please modify the solution, so that the issue faced is reproduced and send it back to us for a review.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Robert Madrian
    Robert Madrian avatar
    163 posts
    Member since:
    Apr 2003

    Posted 27 Sep in reply to Dimitar Link to this post

    Hello,

    It seems that the Problem is that I have Javascript in the Partial View which is not replaced if I reload the tab Content...

    <script>
        @{ Html.RenderPartial("~/Areas/Mitglied/Views/Mitglieddokumente/_tabMitglieddokumenteEdit.min.js"); }
        var tabMitglieddokumenteEditJs = new TabMitglieddokumenteEditJs();
    </script>    

     

  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    176 posts

    Posted 02 Oct Link to this post

    Hello Robert,

    Can you provide additional details about the tabMitglieddokumenteEditJs implementation?

    Also, it would be very helpful if you could modify the provided example in my previous reply, so that the issue faced is reproduced and then send it back to us for a review.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Robert Madrian
    Robert Madrian avatar
    163 posts
    Member since:
    Apr 2003

    Posted 02 Oct in reply to Dimitar Link to this post

    Hi Dimitar,

    I have solved the issue for my own by not loading the javascript with the partial view...

    Thank's for the help

Back to Top