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

Update/refresh tab item content

3 Answers 198 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 14 Jun 2011, 08:04 PM
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!

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Jun 2011, 09:10 AM
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
0
Brian
Top achievements
Rank 1
answered on 20 Jun 2011, 05:58 PM
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.


0
Tina Stancheva
Telerik team
answered on 23 Jun 2011, 12:56 PM
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
Tags
TabControl
Asked by
Brian
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Brian
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or