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

TextBoxes not display content in RadTabControl

1 Answer 72 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 08 Mar 2012, 07:49 PM
I have on my application one Radtabcontrol with several RadTabItem as children.
Each RadTabItem has a set of StackPanel that in turn has several components like TextBox, TextBlock, etc.

The question is: The only items that are initialized are ones of currentTab and the others with excepion of TextBoxes. Why this error happens?

It follows an snippet of code:

InitializeComponent();

InitializeComponent();
this.Width = Utils.Current.Host.Content.ActualWidth - 100;
this.Height = Utils.Current.Host.Content.ActualHeight - 100;
Utils.ProgressBar(ref _semaphoreProgressBar, ref progressBar);
LayoutRoot.KeyUp += new System.Windows.Input.KeyEventHandler(Utils.LayoutRoot_KeyUp);
this.DataContext = new NFeValidator();
LoadCombos();
ResourcesUI();
PermissionsUI();
LoadFields();

and the method LoadFields has the following structure:

textBoxName.Text = data.Name;
numericUpDownNumber.Value = data.Number;
...

Just remebering all the fields (textBoxName, numericupDownNumber are children of Stackpanels that are children of RadTabItem.

Do you know why this bug happen, or what to do to turn around it?

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 13 Mar 2012, 09:52 AM
Hi Edward,

I am not sure if I understand your issue correctly. But if you want to keep the state of the content of all RadTabItems, then you can set the RadTabControl.IsContentPreserved property to True. More information about that property you can find in our online documentation.

Please give it a try and let me know if it helps.

Kind regards,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TabControl
Asked by
Edward
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or