Update/refresh tab item content

4 posts, 0 answers
  1. Brian
    Brian avatar
    10 posts
    Member since:
    Apr 2011

    Posted 14 Jun 2011 Link to this post

    I am trying to update the content of a tab without changing the selected tab.

    I am using MVVM and my tab control is bound to a List of objects.  I use a DataTemplate to show the tab content.  The tab content later changes but the UI does not show the change until you switch to a new tab and back to the original tab. 

    Hope this makes sense....thanks for any help!
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Jun 2011 Link to this post

    Hi Brian,

    Could you please try to use the IsContentPreserved property of the RadTabControl set to true and let us know if this helps you ? If it doesn't you can elaborate more on your scenario, the steps you perform, how you bind your controls, what are the telerik dll versions tahat you use, etc. Thank you for your cooperation.

    Best wishes,
    Petar Mladenov
    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. Brian
    Brian avatar
    10 posts
    Member since:
    Apr 2011

    Posted 20 Jun 2011 Link to this post

    I simply want to update the content of a tab without changing the tab.  Here is my TabControl:

    <Controls:RadTabControl SelectedItem="{Binding SelectedStatementDictionary, Mode=TwoWay}"
                                    ItemsSource="{Binding StatementDictionaryList}"
                                    ItemTemplate="{StaticResource RadTabHeaderTemplate}"
                                    ContentTemplate="{StaticResource RadTabItemTemplate}"
                                    DropDownDisplayMode="Collapsed" ScrollMode="Viewport"
                                    Height="400" Width="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                    Padding="10" telerik:StyleManager.Theme="Windows7" ScrollViewer.VerticalScrollBarVisibility="Auto">

    You can see that my SelectedItem property is set.  When this property is changed, I would expect the tab content to get updated, but it does not.  I am forced to change the selected tab and then change it back and then my changes show up.


  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 23 Jun 2011 Link to this post

    Hi Brian,

    Unfortunately we still cannot reproduce this issue on our side and I am not sure whether we are not missing something from your scenario. This is why I attached the sample project we used to test this case. Can you please have a look at it and let me know if it illustrates your scenario correctly? Thank you in advance.

    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