Current view changes when activating tab?

6 posts, 0 answers
  1. Charles Bates
    Charles Bates avatar
    45 posts
    Member since:
    Feb 2010

    Posted 18 Jun 2010 Link to this post

    Hello,
    We have a RadTabControl inside a RadPane.
    Each RadTabItem contains a Grid, with a ScrollViewer containing  a Canvas.
    The user can move the canvas using the scroll bars or using the mouse to grab and drag the canvas.

    When a tab item is made current by clicking on it, the postion of the canvas is changed; typically, but not always, it is changed to the position of the canvas when the tabitem was first created and the canvas added to it.

    I cannot find any code that we produced that accounts for this (although I am still looking...)  Whle we have a SelectionChanged handler for the TabControl, it does nothing to reposition the canvas.
    Is there something we can do in the TabControl / TabItem that would prevent this repositioning?
    I'll try to reproduce in a simple sample app.
    Thanks,
    C. Bates
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 23 Jun 2010 Link to this post

    Hi Charles Bates,

    This behavior is expected since switching between tabs makes the TabControl unload the content of the last active item and load the content of the newly selected item, when the control is data bound to some collection of items. This load/unload operations involve add/remove actions in the visual tree, thus the content does not keep its state.

    However, there is a corresponding item in our PITS, which you can vote for thus increasing its priority.

    Kind regards,
    Tina Stancheva
    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. Peter
    Peter avatar
    4 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    I too have voted this up (and is quite important)
    My situation:
    RadTabControl bound to a collection
    Each item in the collection represents an item containing a list of data which is presented to the user in a RadGridView
    the problem is that I want the user to be able to group/resize columns/hide+add columns, and this should still be available when the user switches back.
    The problems I am facing with the current implementation (unloading + loading data on demand):
    - apparent flickering of the screen when switching tabs (+delay)
    - losing the things the user changed (scroll position, grouping, column reordering, ...)

    I found a solution with using an ItemsControl and setting the visibility based on the selected tab but then I have layout issues with the RadGridView (does not take full height automatically + if too many rows, does not display a scrollbar but renders completely, even outside of the visible window)
  5. Peter
    Peter avatar
    4 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    if anyone has any suggestions for a temporary fix, feel free...
  6. Charles Bates
    Charles Bates avatar
    45 posts
    Member since:
    Feb 2010

    Posted 16 Apr 2011 Link to this post

    Hello --
    I saw in PITS that this is marked "Resolved" in 2010 Q3 SP+.  I have 2010.3.1326.1040 installed, and can't find the IsContentPreserved property.
    What is the minimum version that supports this?
    Thanks.

  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 19 Apr 2011 Link to this post

    Hello Charles Bates,

    This property was introduced with the Q1 2011 official release. You can examine the release notes here.

    All the best,
    Tina Stancheva
    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
Back to Top
DevCraft banner