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

RadTabControl destroying content on each selectionchanged?

6 Answers 151 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Adriano
Top achievements
Rank 1
Adriano asked on 12 Apr 2010, 05:23 PM
We're working on a silverlight 4 RC project and we're using a radtabcontrol binded to a datasource. Each radtabitem has a header template and a content template. In the content template we instantiate an our user control. The problem is that for each tab item selection, the existing user control is destroyed and re-created and this behavior triggers a wcf call that we don't want.

In a previous Silverlight 3 project we used the same template and all is working fine (no re-creation of user control in radtabitem content template).

So, could you help us with this strange behavior?

Regards
Adriano

6 Answers, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 14 Apr 2010, 09:20 AM
Hello Adriano,

Can we ask you to send us a sample project demonstrating the problem?
From the description supplied it seems that the project is fairly complex and it will be better to have a project in order to be sure that we are investigating "the right issue".

We are awaiting for your response.

Best wishes,
Vladislav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
JC
Top achievements
Rank 1
answered on 24 Feb 2011, 11:47 PM
I am getting the same issue with the last build. Is there a solution to this?
0
Hristo
Telerik team
answered on 01 Mar 2011, 10:29 AM
Hello JC,

Current version of RadTabControl uses a single ContentPresenter to display the data. That means every tab item puts its content into this single content presenter. That is why when selection is changed the content presenter is provided new content (or data context in data bound scenario) and this causes elements to be pulled out from the visual tree.

We are developing functionality to preserve the content state that should be included in our next release - 2011 Q1. The release is scheduled for the second half of March this year.

Unfortunately there is no way to prevent the described content change during selection in the current version, that why we are improving the flexibility.

Hope the Q1 is good time frame for you.

All the best,
Hristo
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
JC
Top achievements
Rank 1
answered on 01 Mar 2011, 10:50 AM
Thanks. Good news that the content will be preserved with Q1.
0
simon
Top achievements
Rank 1
answered on 21 Mar 2011, 05:29 AM
Did this functionality make it into the q1 2011?? I'm not seeing a difference personally.

S.
0
Petar Mladenov
Telerik team
answered on 21 Mar 2011, 09:08 AM
Hello JC,

Yes, the IsContentPreserved property is exposed in Q1 2011 official release. You can find a good starting article here. Feel free to ask if you need further assistance on this.

Best wishes,
Petar Mladenov
the Telerik team
Tags
TabControl
Asked by
Adriano
Top achievements
Rank 1
Answers by
Vladislav
Telerik team
JC
Top achievements
Rank 1
Hristo
Telerik team
simon
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or