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

Change TabItem - Binding Problem

1 Answer 37 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 03 May 2013, 06:22 AM
Hi,

i use a RadTabControl with a AutoCompleteBox on it. Here i select a customer and fill the TabItem with data.
After changing the Tab the TabItem is empty? the AutoCompelteBox is empty, too!

The Main Problem is that i create each tab by code and in each tab a usercontrol is loaded. Now i select a customer
and display the data in the tabitem. When i change the tab the first one is empty again when i come back.

What is to do to hold the information in the TabItem?

THanks
Best Regards
Rene

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 07 May 2013, 11:47 AM
Hello Rene, 

We already answered this question in your support ticket. However, I will post the same answer here so others from the community can see it.

By default the RadTabControl only keeps the content for its selected tab. After the selection is changed the content of the last active RadTabItem is unloaded and that is why the content does not keep its state. However, you can use the RadTabControl.IsContentPreserved property which loads the RadTabItems and does not unload them after the selection is changed. For more information about the IsContentPreserved property you could take a look at this article.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TabControl
Asked by
ITA
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or