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

TabControl dynamic binding

1 Answer 95 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Ketaki
Top achievements
Rank 1
Ketaki asked on 27 Sep 2010, 08:19 AM
Hello,

I am using TabControl in my application. I want to use ScrollMode="ViewPort" and DropDownDisplayMode="Visible" functionality. The moment I bind the data dynamically to TabControl there is some styling issue which is coming and I am not able to resolve it.
Refer the attached screenshot "Tabs_DynamicBinding.png", where you will find the Text which is binded gets repeated.

In case of static binding which is tried similar to demo example given on the site, there seems no issue in styling. Refer "Tabs_StaticBinding.png", where you will find the header text which is statically binded does not get repeated.

It seems to be styling issue if the data is binded dynamically. Will you please help to get rid of this issue asap? I need this on urgent basis.

Thanks
Ketaki



1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 29 Sep 2010, 02:11 PM
Hello Ketaki,

I am not really sure what you mean by "static" and "dynamic" binding. However, when the RadTabControl is databound to a collection, then you can apply an ItemTemplate and a ContentTemplate to define what to be displayed.

The ItemTemplate property defines the Header of each TabItem, same as the DisplayMemberPath property. The ContentTemplate, on the other hand, controls the content of each RadTabItem. More information you can find here.

If, however, the RadTabControl is defined in XAML and you only set a Header to each RadTabItem, then the content of the item will remain empty.

From the code snippet you sent it seems that you have defined both an ItemTemplate( or a DisplayMemberPath) and a ContentTemplate for the RadTabControl:


Is that the case or I am missing something?

Sincerely yours,
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
Tags
TabControl
Asked by
Ketaki
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or