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

Load Content when item changes

4 Answers 142 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
WOLFGANG
Top achievements
Rank 1
Veteran
WOLFGANG asked on 23 Dec 2020, 01:34 AM

I have a controller for which the "Index" view just shows a row of data from a model collection. When the "Details" link is selected at any row, I switch to a "Details" page for the same controller with the following tabs:

General: Showing details for the selected model

Contacts: Showing address and phone data for the same model

etc.

The issue I have is that upon selecting the Contacts tab, I need to get data loaded from my model suitable for that tab and I don't know how to affect it.

I have something like this (gleaned after hours of searching:)

tabstrip.Add().Text("Contact").LoadContentFrom("EditContact", "HouseholdController", new { id = Model.Facility_Id }).Selected("@Model.tab" == "Contact");

but that doesn't do anything when I select the tab. I'm at a loss.

The HouseholdController has the following method:

        public ActionResult EditContact()
        {
            var model = db.GetWithFacility_Id(1);
            return View(model);
        }

I am grateful for any guidance. I'm a total beginner here.

4 Answers, 1 is accepted

Sort by
0
Vincent
Top achievements
Rank 1
Iron
answered on 23 Dec 2020, 10:18 AM
i think this is a bug in 2020R3Sp2, new tab items is are duplicate.
0
WOLFGANG
Top achievements
Rank 1
Veteran
answered on 23 Dec 2020, 03:32 PM
Thank you @Vincent but that answer went right over my head.
0
Vincent
Top achievements
Rank 1
Iron
answered on 24 Dec 2020, 01:54 AM

https://demos.telerik.com/aspnet-core/tabstrip/api

you can try the official demo for tabstrip. select Swimming tab and click the insert before button, then switch tab. the content of Swimming disappeared. 

see the html in chrome, you will find the new tab id was same as Swimming tab. that is the point.

 

 

0
Misho
Telerik team
answered on 25 Dec 2020, 01:14 PM

Hi,

Thank you for your reports. I can confirm there is an issue with items id duplication in TabStrip with 2020R3SP2. This issue has been already addressed and resolved. You could expect to obtain the fix in our major release R1 2021 which is scheduled in the mid of January. The fix is also available in the latest internal build from December 16th which you could use for testing.

https://www.screencast.com/t/WUOWMM4VIJ 

I hope you will find this information useful.

 

Thanks for your collaboration.

Best Regards,


Misho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TabStrip
Asked by
WOLFGANG
Top achievements
Rank 1
Veteran
Answers by
Vincent
Top achievements
Rank 1
Iron
WOLFGANG
Top achievements
Rank 1
Veteran
Misho
Telerik team
Share this question
or