Hi,
First of all, my issue is about RadTabControl and RadHtmlPlaceholder.
In fact my scenario is quite simple. I have 2 RadTabItems with a RadHtmlPlaceholder as content template. Each time I select a tab and then come back to the previous tab, the sourceUrl of the embedded RadHtmlPlaceholder is reloaded. It means that if I made some actions on my webpage like entries in a form, I loose them everytime I change tab. I tried to set the IsContentPreserved property to true, however nothing changes about my issue.
I hope you will help me,
Thank you,
Regards,
8 Answers, 1 is accepted
This is a known issue in RadHtmlPlaceHolder control and we are aware of it. This issue is logged in our feedback portal where you can follow and track its progress. Basically, this is a complex issue due to the integration between RadTabControl and RadHtmlPlaceHolder.
Regards,
Dinko
Telerik
Currently, there is no progress on the issue. You can check for status changes in the feedback portal where you can also subscribe for the feedback item. This way you will be notified by email as soon a there is a status change.
Regards,
Martin
Telerik by Progress
Hi,
More than a year has elapsed and when i have a look to your feedback portal the status is marked as approved.
Could you please tell me when I can expect this fix?
Thanks,
In fact, I have just noticed that the issue is more general.
I defined my tabControl with the following contentTemplate :
<
Style
x:Key
=
"ClosableStyle"
TargetType
=
"telerik:RadTabItem"
BasedOn
=
"{StaticResource RadTabItemStyle}"
>
<
Setter
Property
=
"IsEnabled"
Value
=
"{Binding IsEnabled}"
/>
<
Setter
Property
=
"HeaderTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
ContentControl
Content
=
"{Binding Title}"
/>
<
telerik:RadButton
Grid.Column
=
"1"
Width
=
"16"
Height
=
"16"
Margin
=
"3 0 0 0"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
userControl:RoutedEventHelper.EnableRoutedClick
=
"True"
Content
=
"x"
Padding
=
"0"
IsEnabled
=
"{Binding IsCloseEnabled}"
Style
=
"{StaticResource NoBorderRadButtonStyle}"
/>
</
Grid
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"ContentTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
Grid
>
<!--add a frame!-->
<
navigation:Frame
Padding
=
"5,5,5,5"
x:Name
=
"Frame"
Source
=
"{Binding Uri}"
VerticalContentAlignment
=
"Stretch"
HorizontalContentAlignment
=
"Stretch"
JournalOwnership
=
"OwnsJournal"
Grid.Row
=
"1"
Grid.Column
=
"1"
>
<
navigation:Frame.UriMapper
>
<
uriMapper:UriMapper
>
<
uriMapper:UriMapping
Uri
=
"/ModuleExecution"
MappedUri
=
"/Views/Modules/ModuleEditionView.xaml"
/>
<
uriMapper:UriMapping
Uri
=
"/Refresh/Module/{pageName}/{param}"
MappedUri
=
"/Views/ModuleMenu.xaml?Menu={pageName}&Refresh={param}"
/>
<
uriMapper:UriMapping
Uri
=
"/Refresh/{pageName}/{param}"
MappedUri
=
"/Views/{pageName}View.xaml?Refresh={param}"
/>
<
uriMapper:UriMapping
Uri
=
"/Module/{pageName}"
MappedUri
=
"/Views/ModuleMenu.xaml?Menu={pageName}"
/>
<
uriMapper:UriMapping
Uri
=
"/FormulaEdition"
MappedUri
=
"/Views/Formulas/FormulaEditionView.xaml"
/>
<
uriMapper:UriMapping
Uri
=
"/GeneralLedger"
MappedUri
=
"/Views/GeneralLedger/GeneralLedgerView.xaml"
/>
<
uriMapper:UriMapping
Uri
=
"/Asp/{pageName}"
MappedUri
=
"/Views/AspPlaceHolder.xaml?Page={pageName}"
/>
<
uriMapper:UriMapping
Uri
=
"/{pageName}"
MappedUri
=
"/Views/{pageName}View.xaml"
/>
</
uriMapper:UriMapper
>
</
navigation:Frame.UriMapper
>
</
navigation:Frame
>
</
Grid
>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
Each time I select a tab and then come back to the previous tab, the state of the page is lost. It's not only about RadHtmlPlaceHolder but every Silverlight views. My tabControl is defined like this :
LayoutRoot.Children.Clear();
_tabControl =
new
RadTabControl();
_tabControl.ItemContainerStyle = Resources[
"ClosableStyle"
]
as
Style;
_tabControl.Align = Telerik.Windows.Controls.TabControl.TabStripAlign.Right;
_tabControl.IsContentPreserved =
true
;
_tabControl.SelectedItemRemoveBehaviour = Telerik.Windows.Controls.TabControl.SelectedItemRemoveBehaviour.SelectLast;
_tabControl.AllowDragReorder =
true
;
_tabControl.SelectionChanged += _tabControl_SelectionChanged;
LayoutRoot.Children.Add(_tabControl);
_tabControl.ItemsSource = tabItemsModel;
Regards,
I used your code to test the reported general behavior but I wasn't able to reproduce it. The state of the tabs is preserved when using a Frame or any other SL UIElement. Can you try setting the SupressSelectedContentTemplateReapplying property of RadTabControl to True and see if the issue still occurs?
As for the issue logged in the feedback portal, currently this is not included in the planning for the next official release. The Approved status means that the item is a confirmed issue, but it doesn't bound to a timeframe for fixing it. If you follow the item in the portal you will be notified by email when there is a change in the item's status.
Regards,
Martin Ivanov
Progress Telerik
Hi,
It's been more than two years that I opened this thread and I still have no update about that very annoying issue.
Could you please tell me if you planned to fix that issue one day ?
https://feedback.telerik.com/Project/143/Feedback/Details/182665-htmlplaceholder-when-placed-in-tabcontrol-with-iscontentpreserved-true-the-k
Thanks,
I am afraid that this is not included in our current planning. The issue's priority is not very high compared to some other items, however, I can suggest you follow the item in the portal and also our roadmap. If any change in the issue's status appears you can see it there.
Regards,
Martin Ivanov
Progress Telerik