TabControl dynamic binding

2 posts, 0 answers
  1. Ketaki
    Ketaki avatar
    26 posts
    Member since:
    Apr 2009

    Posted 27 Sep 2010 Link to this post


    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.


  2. Petar Mladenov
    Petar Mladenov avatar
    3162 posts

    Posted 29 Sep 2010 Link to this post

    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
Back to Top