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

Setting RadTabItem.HeaderTemplate in Code with Resource

5 Answers 264 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 03 Apr 2009, 09:52 AM
Hi i'm binding my Tab Control to a DB and need to Bind the Text in the Header i have looked at afew Examples but none seem to work i have to be able to set the Content Template from the Code behind aswell but i'm just trying to get the Header Template working for the moment Please help

David

5 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav
Telerik team
answered on 04 Apr 2009, 09:13 AM
Hi David,

I tried creating a similar scenario and it turned out that there was a missing TemplateBinding in the ControTemplate of the TabItem. This may be the reason why you have not been able to get the binding working. The fix will be available for the next SP.

I created a simple project where the HeaderTemplateSelector and ItemTemplateSelector properties are used to select different templtaes for the TabItem. Also the fixed ControlTemplate, so you can use it until the SP.

Kind regards,
Miroslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
David
Top achievements
Rank 1
answered on 04 Apr 2009, 10:29 AM
Thats Great works a treat Do you know when the SP will be released?
as i'm working on a big project and need to plan updates

David
0
Miroslav
Telerik team
answered on 04 Apr 2009, 10:34 AM
Hi David,

Unfortunately I cannot pinpoint an exact date, but the SP will be available in the coming two weeks.

Hopefully it will fit into your schedule.

Regards,
Miroslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Sébastien ISINGRINI
Top achievements
Rank 1
answered on 02 Feb 2010, 01:23 PM
Hi Telerik Team,

I downloaded and tested your sample and It works well. But I replaced the Telerik.Windows.Controls.dll and Telerik.Windows.Controls.Navigation.dll by the new ones of the version I use (2009.3.1127.1030) and the sample does not work any more : the content of the tabs is not displayed and do not use the template selector.

That's exactly my problem today that I want to do.

Do you have any idea please? I don't understand why my template selector is not used when I put a header template.

Sébastien
0
DenisCL
Top achievements
Rank 1
answered on 03 Feb 2010, 01:26 PM
In 2009.3 the properties have changed : 

You can use the new property ContentTemplate and ContentTemplateSelector

Tags
TabControl
Asked by
David
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
David
Top achievements
Rank 1
Sébastien ISINGRINI
Top achievements
Rank 1
DenisCL
Top achievements
Rank 1
Share this question
or