RadTabControl destroying content on each selectionchanged?

7 posts, 0 answers
  1. Adriano
    Adriano avatar
    43 posts
    Member since:
    Jan 2009

    Posted 12 Apr 2010 Link to this post

    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
  2. Vladislav
    Admin
    Vladislav avatar
    276 posts

    Posted 14 Apr 2010 Link to this post

    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.
  3. DevCraft banner
  4. JC
    JC avatar
    5 posts
    Member since:
    May 2005

    Posted 24 Feb 2011 Link to this post

    I am getting the same issue with the last build. Is there a solution to this?
  5. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 01 Mar 2011 Link to this post

    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!
  6. JC
    JC avatar
    5 posts
    Member since:
    May 2005

    Posted 01 Mar 2011 Link to this post

    Thanks. Good news that the content will be preserved with Q1.
  7. simon
    simon avatar
    1 posts
    Member since:
    Mar 2011

    Posted 21 Mar 2011 Link to this post

    Did this functionality make it into the q1 2011?? I'm not seeing a difference personally.

    S.
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 21 Mar 2011 Link to this post

    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
Back to Top
DevCraft banner