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

Reload tab content in partial view...

4 Answers 661 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 21 Sep 2017, 10:05 AM

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

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 25 Sep 2017, 02:27 PM
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.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 27 Sep 2017, 12:34 PM

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>    

 

0
Accepted
Dimitar
Telerik team
answered on 02 Oct 2017, 07:53 AM
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.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 02 Oct 2017, 09:45 AM

Hi Dimitar,

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

Thank's for the help

Tags
TabStrip
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Dimitar
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Share this question
or